[Fwd: Catalog listing]

2004-01-04 Thread Adam i Agnieszka Gasiorowski FNORD

LOL, look what I've got after posting
 to one of the groups about my problem with
 multiple JOIN query...Some kind of robot
 reads one of them?

 Original Message 
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Precedence: bulk
Subject: Catalog listing
To: [EMAIL PROTECTED]

Catalog PAGE OF THE BOOK IS VISIBLE IN THE SECTION does not exist.

smime.p7s
Description: S/MIME Cryptographic Signature


Re: Help:)

2004-01-04 Thread Michael Stassen
robert_rowe wrote:
Issuing this command:


mysqlSET PASSWORD FOR 'root'@'localhost' = PASSWORD xx
set your password to xx
I'm not so sure.  PASSWORD is a function which expects a string.  The 
correct syntax is

  SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password')

so I don't believe this worked unless Don is misquoting what he did.

You will need to use 

mysql -u root -p xx
This will not work.  You may not put a space between the -p and the 
password.  The space indicates that xx is the db to use.  If you 
want to provide the password on the command line (not really a good 
idea), the syntax is

  mysql -u root -pxx

See, no space between the -p and the password.

from the local machine to get access with the root user.

This:

mysql -u root -p

is specifying a blank password.
No, it is not.  The -p indicates you want to give a password to 
authenticate.  Since you didn't provide the password on the command 
line, mysql will prompt you for it.

I believe that this:

mysql -u root 

will prompt you for the password without echoing it to the screen.
No.  This will try to authenticate without a password, which will only 
work if the specified user (root, in this case) has no password.

Don,

I expect that when you enter `mysql -u root -p`, you get prompted for a 
password and then get an error message.  It would help if you would 
please post the exact text of the error message.  In the meantime, try 
your old password (or no password, `mysql -u root`, if root didn't have 
one before), in case the SET PASSWORD failed.

Alternatively, take a look at How to Reset a Forgotten Root Password 
http://www.mysql.com/doc/en/Resetting_permissions.html in the manual 
for the directions on how to use --skip-grant-tables to recover your 
root mysql password.

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Trouble With Counting New Documents With Complex Query

2004-01-04 Thread Adam i Agnieszka Gasiorowski FNORD
Bob Terrell wrote:
 
 on 1/2/04 12:59 PM, Adam i Agnieszka Gasiorowski FNORD wrote:
 
 Thanks for the info. Just so I'm sure I know what I should: :)

Thanks for your answer, very helpful!
 
  ?
  $suma = 0;
 
 For starters, you won't need this line anymore. You'll see why in a minute.

Can't wait! :8]
 
  $pytanie  = SELECT COUNT(DISTINCT x_article.ID) AS CNT ;
 
 This line is okay. :)

Cool. I'm not _that_ stupid, then ;8].
 
  $pytanie .= FROM x_article ;
  $pytanie .= LEFT JOIN x_instance ;
  $pytanie .= ON x_article.ID = x_instance.Article ;
 
 Since an article will always belong to at least one section (right?), you don't need 
 to do a left join. An equijoin will work just fine.

You are right.
 
  $pytanie .= LEFT JOIN x_section ;
  $pytanie .= ON x_instance.Section = x_section.ID ;
 
 You can also change these lines to an equijoin.

Sure. But isn't LEFT JOIN specially optimized
 in MySQL, or it doesn't matter in this case? NATURAL
 JOIN if else.
 
  $pytanie .= WHERE (x_section.Status  1) = 0 ; // not empty
 
 If all this does is figure out if there are articles in a section, this isn't 
 needed. You could find that out by joining it to x_instance. (We're doing that here 
 anyway.)

Great! One less bit mask test! :8]. An improvment!
 
  $pytanie .= AND (x_section.Dept = 2 OR x_section.Dept = 5) ; // Drugs,
  NeuroGroove
 
 You should put first whichever of those is more likely to be true. If you get more 
 articles in your drugs category than in your NeuroGroove category, leave it. If not, 
 flip it. This is because most applications (and I would assume MySQL is no 
 exception) don't bother to continue testing logic conditions in an OR statement once 
 they hit a true one.

This one will not be changed, Drugs is MUCH bigger
 than NeuroGroove (and updated more often, people rarely
 write good experience reports).
 
  $pytanie .= AND (x_instance.Status  255) = 0 ; // not hidden, etc
 
 If this is all this flag does, it may be quicker to do an ENUM. You're forcing two 
 operations on it here, one for the bitmask and one for the test. Alternatively, you 
 could flip your flag so that 0 means hidden and 1 means visible. Then you could drop 
 the =0. Ditto for the one above.
 
EXCELENT IDEA!

So it will be 'AND (x_instance.Status  0)' now :8]. Yea!
 Should give me TRUE if there are not bits set, right? Ha ha!
 One less test!

  $pytanie .= AND UNIX_TIMESTAMP(x_article.Date) BETWEEN  . mktime(0, 0, 1,
  date('m'), date('d'), date('Y')) .  AND UNIX_TIMESTAMP(NOW()) ;
 
 Here we reach what's probably causing a lot of the processing time. Date and time 
 functions are relatively processor intensive. In addition, BETWEEN can't use 
 indexes. Also, unless you have articles for future dates and times, you don't need 
 to check an upper bound.
 
 Because datetimes are returned as strings, you can use string functions to return 
 just the date. Note that the date is all your really concerned about (again, unless 
 the time really matters to you, which it doesn't seem to.) In this case, LEFT will 
 work wonders.
 
 Also, since you don't need to check for an upper bound on time, you only need to 
 check to see if the date is the same.
 
 In short, you can change these lines to:
 
 $pytanie .= AND LEFT(x_article.Date, 10) = CURDATE();
 
 If you need to keep the time, just use:
 
 $pytanie .= AND x_article.Date = CURDATE() AND x_article.Date = NOW();

Wow!
 
 If you're looking for articles that aren't for today, simply provide the appropriate 
 date instead of CURDATE() and NOW()

Fortunately, I don't need to do that right now.
 
  $pytanie .= GROUP BY x_article.ID;
 
 You don't need a group by. You just want a count of the articles. The group by here 
 is doing almost the same thing as the DISTINCT above, only it's adding a lot of 
 processing time.

Thank you! I'll test it, just to be sure.
 
  $wynik = mysql_query($pytanie);
 
 No problems here. :)

LOL.
 
  while ($tmp = mysql_fetch_array($wynik))
  {
  $suma += $tmp['CNT'];
  }
 
 With the new query, you should get your answer in one field. Those lines can change 
 to:
 
 $suma = mysql_result($wynik, 0, 'CNT'); // The , 'CNT' is actually optional.

Of course.
 
  if ($suma)
  {
  // pretty-printing of the result
  $dzisdodano = str_pad((string)(int)$suma, 4, '0', STR_PAD_LEFT);
  }
  else $dzisdodano = '';
  ?
 
 Do you really need that else? Won't it pad a 0 with zeros?

Yes, that is what I had in mind. No change here.
 
 So, here's the query in its final form, without modifying your data structure. If 
 this is a query still runs slowly and is run very often, you may want to consider 
 trying to drop the second join by moving data in your database. I'm going to 
 rearrange the WHERE clauses, since, depending on (or perhaps because of) how well 
 the query optimizer works, you should most your most restrictive clauses first.


SQL syntax? [Select within Insert]

2004-01-04 Thread EP
Struggling to get an INSERT to work, can anyone help?

Here's my scenario:

Students[table]

Student_ID  [primary key, auto-increment]
Student_name
Student_sex
Extra_Credit[table]

EC_ID   [primary key, auto-increment]
Student_ID
Points
First:  INSERT INTO Students (Student_name, Student_sex) VALUES('Josh 
Baxter, M);

[suceeds]

Then:  INSERT INTO Extra_Credit (Student_ID, Points) SELECT MAX(Student_ID) 
from Students,

(1)	...VALUE ('25');

or

(2)	... '25' as Points;

Either one fails... Any hints on syntax to achieve the insert (pulling the 
Student_ID in from the just modified record in the Students table)?

TIA!

Eric Pederson





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Trouble With Counting New Documents With Complex Query

2004-01-04 Thread Adam i Agnieszka Gasiorowski FNORD
Bob Terrell wrote:
 
 So there you go. Give it a shot and see if it runs any faster. If you need the time, 
 replace that first test in the WHERE clause with the one mentioned above. If this is 
 run often (or if it just takes a _really_ long time), put an index on the date 
 field, if one isn't there already. Your query as it stands has to read the entire 
 table just for the date field.

Ah, now it striked me, that I should add
 to this sum of WIKI articles instantiated in
 2 OR 5. Will do it with a second query or
 use one of the functions written by my comrade
 emes, I will have to look into the code to
 check if I have to write my own.

Thanks again!

-- 
Seks, seksi, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info  { iWanToDie }   WiNoNa)   (
http://szatanowskie-ladacznice.0-700.pl  foReVeR(  *  )
Poznaj jej zwiewne ksztaty... http://www.opera.com 007


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Default DATE field values

2004-01-04 Thread Chris Nolan
Hi,

Firstly, thanks for the reply.

I'm aware that MySQL requires that default values be constants without
reference to expressions that need to be evaluated and the fields in
question will never be updated - it's a set-once thing.

The reason I asked is due to the information in the MySQL manual stating
they were related. The only reason I didn't use TIMESTAMP from the
outset is because we don't want the time part of the field. I think we
can spare the extra few bytes per row though, so I'll probably use
TIMESTAMP fields anyway.

Thanks again!

Regards,

Chris

On Sun, 2004-01-04 at 11:13, Matt W wrote:
 Hi Chris,
 
 Nope, DEFAULT values have to be constants; no functions or anything.
 :-/
 
 What are you trying to do?  And what's wrong with using TIMESTAMP since
 you want a default of NOW()?  If it's because you don't want it update
 when you UPDATE the row, you can just set it to its current value, if
 you weren't aware of that.
 
 
 Matt
 
 
 - Original Message -
 From: Chris Nolan
 Sent: Saturday, January 03, 2004 10:34 AM
 Subject: Default DATE field values
 
 
  Hi all,
 
  Upon reading the funky manual, I have discovered the following things:
 
  1. TIMESTAMP fields can be set so that their default value is NOW().
  2. DATE and TIMESTAMP fields are related.
 
  Given the two above facts, is there a way to set DATE columns so the
  default value is NOW()? My playing around seems to have not produced
 any
  fruitful results.
 
  Regards,
 
  Chris
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: SQL syntax? [Select within Insert]

2004-01-04 Thread Aleksandar Bradaric
Hi,

 Then:  INSERT INTO Extra_Credit (Student_ID, Points) SELECT MAX(Student_ID)
 from Students,

 (1)   ...VALUE ('25');

 or

 (2)   ... '25' as Points;

I think this is your query:

INSERT INTO Extra_Credit(Student_ID, Points) SELECT MAX(Student_ID), '25' from Students


Take care,
Aleksandar


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



insert: auto increment field

2004-01-04 Thread Mike Mapsnac
I have table with 7 fields. First field is id (auto increment). As I 
understand the value should start from 0 and  next value will auto 
increment.

And I shouldn't add insert the value. So the insert
statemens below gives me an error. ERROR 1136:Column count doesn't match 
value count at row 1

insert into product values('456789','t1', 'new', 2, 2, 10);

_
Have fun customizing MSN Messenger — learn how here!  
http://www.msnmessenger-download.com/tracking/reach_customize

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


mysql 5.0

2004-01-04 Thread jamie murray
Hi guys,
I posted a similar question on this the other day but received no answers.
I'm running 5.0 and have a possible security/password  problem. If i run from command 
line all users work with or without passwords.
If I try and connect to mysql through php,perl,python or odbc with a user that has a 
password I get client authentication protocol error.
If I connect with any of the above with a user who has no password everything works 
fine.
Does this have to do with 5.0 change to the password hash.
 If you have advice to offer it would be greatly appreciated.

Thanks!

Re: insert: auto increment field

2004-01-04 Thread Steve Folly
On 4 Jan 2004, at 15:09, Mike Mapsnac wrote:

I have table with 7 fields. First field is id (auto increment). As I 
understand the value should start from 0 and  next value will auto 
increment.

And I shouldn't add insert the value. So the insert
statemens below gives me an error. ERROR 1136:Column count doesn't 
match value count at row 1

insert into product values('456789','t1', 'new', 2, 2, 10);
Two options:

Use NULL as the value for the auto-increment column. (Probably the 
easiest method!)
(side note: you can then retrieve the real value with LAST_INSERT_ID() 
function)

Or, specify the column names in your query as well, so MySQL can tie up 
columns and values:

insert into product (col2, col3, col4, col5, col6) 
values('456789','t1', 'new', 2, 2, 10)

Without column names, it expects there to be values for all columns. So 
in your case, just don't specify the auto-increment column.

HTH
Steve.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: insert: auto increment field

2004-01-04 Thread Donald Henson
On Sun, 2004-01-04 at 08:09, Mike Mapsnac wrote:
 I have table with 7 fields. First field is id (auto increment). As I 
 understand the value should start from 0 and  next value will auto 
 increment.
 
 And I shouldn't add insert the value. So the insert
 statemens below gives me an error. ERROR 1136:Column count doesn't match 
 value count at row 1
 
 insert into product values('456789','t1', 'new', 2, 2, 10);

Try using NULL for the id field, thusly:

insert into product values (NULL,'456789','t1','new',2,2,10);

I didn't actually try this but it should work.

Don Henson



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Join sintax question

2004-01-04 Thread Giulio
HI all,

I have two tables, let's say AudioTrack and Category
Every AudioTrack record can belong to one or more ( or none ) 
Categories.
I have created an intermediate table, AudioTracks_ Categories 
containing only the IDs of AudioTrack and Category to keep track of the 
link.

I can easily find AudioTrack records for a given Category id:

select AudioTrack.* from AudioTrack left join AudioTracks_ Categories 
on AudioTrack.AudioTrack_id = AudioTracks_ Categories.AudioTrack_id 
where AudioTracks_ Categories.Category_id = somevalue

I can also easily find AudioTrack records for a given Category id OR 
others Category id, adding  distinct to avoid row duplication for 
AudioTrack records contained in more than one of the specyfied 
categories:

select distinct AudioTrack.* from AudioTrack left join AudioTracks_ 
Categories on AudioTrack.AudioTrack_id = AudioTracks_ 
Categories.AudioTrack_id where AudioTracks_ Categories.Category_id = 
somevalue or AudioTracks_ Categories.Category_id = somevalue...

Now the question is, how can I handle an AND query, I mean how can I 
have returned only the AudioTrack records that belongs to ALL the 
Category IDs I put in the query?

Hope the question was clear...   :)

thanks in advance for your answer,

   Giulio

RE: Help:)

2004-01-04 Thread Don Matlock
Thank you very much for the prompt reply.
Yes you were correct, it was the fact that the password had not been
entered at all...I did the 
mysql -u root -p
when prompted for the password I just hit enter and was able to get in.

Now I have to figure out why its not accepting the password.  I type the
following command as root in mysql:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 3.23.49-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql SET PASSWORD FOR 'root'@'localhost' = PASSWORD 'xx'

This is exactly how I typed it in...(just copied and pasted)
When I hit enter with that password...I just get a prompt...no
confirmation the password was accepted or anything.
Did I type in the command for the pass wrong?
Don

-Original Message-
From: Michael Stassen [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 04, 2004 2:40 AM
To: robert_rowe
Cc: [EMAIL PROTECTED]; Don Matlock
Subject: Re: Help:)


robert_rowe wrote:
 Issuing this command:
 
 
mysqlSET PASSWORD FOR 'root'@'localhost' = PASSWORD xx
 
 set your password to xx

I'm not so sure.  PASSWORD is a function which expects a string.  The 
correct syntax is

   SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password')

so I don't believe this worked unless Don is misquoting what he did.

 You will need to use 
 
 mysql -u root -p xx

This will not work.  You may not put a space between the -p and the 
password.  The space indicates that xx is the db to use.  If you

want to provide the password on the command line (not really a good 
idea), the syntax is

   mysql -u root -pxx

See, no space between the -p and the password.

 from the local machine to get access with the root user.
 
 This:
 
 mysql -u root -p
 
 is specifying a blank password.

No, it is not.  The -p indicates you want to give a password to 
authenticate.  Since you didn't provide the password on the command 
line, mysql will prompt you for it.

 
 I believe that this:
 
 mysql -u root 
 
 will prompt you for the password without echoing it to the screen.

No.  This will try to authenticate without a password, which will only 
work if the specified user (root, in this case) has no password.

Don,

I expect that when you enter `mysql -u root -p`, you get prompted for a 
password and then get an error message.  It would help if you would 
please post the exact text of the error message.  In the meantime, try 
your old password (or no password, `mysql -u root`, if root didn't have 
one before), in case the SET PASSWORD failed.

Alternatively, take a look at How to Reset a Forgotten Root Password 
http://www.mysql.com/doc/en/Resetting_permissions.html in the manual 
for the directions on how to use --skip-grant-tables to recover your 
root mysql password.

Michael




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Join sintax question

2004-01-04 Thread Douglas Sims
Hi Giulio

I think you could do this by repeatedly left-joining the categories 
table as in this:

SELECT AudioTrack.*
FROM AudioTrack A
LEFT JOIN AudioTracks_Categories C1 ON A.AudioTrack_id=C1.AudioTrack_id
LEFT JOIN AudioTracks_Categories C2 ON A.AudioTrack_id=C2.AudioTrack_id
LEFT JOIN AudioTracks_Categories C3 ON A.AudioTrack_id=C3.AudioTrack_id
...
WHERE C1.Category_id={first category} AND C2.Category_id={second 
category} AND C3.Category_id={third category} ...

If you have indexes for the Audio_Tracks_Categories.Category_id column 
and the AudioTrack.AudioTrack_id column, this should be more efficient 
that you might think.

Also, I think a slightly more efficient way of doing the first query you 
sent, the OR query, would be to GROUP BY the AudioTracks_Categories, 
as this way it will have to join fewer rows from the AudioTrack table, 
as this:

select AudioTrack.* from AudioTrack left join AudioTracks_ Categories on 
AudioTrack.AudioTrack_id = AudioTracks_ Categories.AudioTrack_id where 
AudioTracks_ Categories.Category_id = somevalue or AudioTracks_ 
Categories.Category_id = somevalue...  GROUP BY Categories.Category_id

Does anyone else agree or disagree with this idea???

Good luck.

-Doug



Giulio wrote:

HI all,

I have two tables, let's say AudioTrack and Category
Every AudioTrack record can belong to one or more ( or none ) Categories.
I have created an intermediate table, AudioTracks_ Categories 
containing only the IDs of AudioTrack and Category to keep track of 
the link.

I can easily find AudioTrack records for a given Category id:

select AudioTrack.* from AudioTrack left join AudioTracks_ Categories 
on AudioTrack.AudioTrack_id = AudioTracks_ Categories.AudioTrack_id 
where AudioTracks_ Categories.Category_id = somevalue

I can also easily find AudioTrack records for a given Category id OR 
others Category id, adding  distinct to avoid row duplication for 
AudioTrack records contained in more than one of the specyfied 
categories:

select distinct AudioTrack.* from AudioTrack left join AudioTracks_ 
Categories on AudioTrack.AudioTrack_id = AudioTracks_ 
Categories.AudioTrack_id where AudioTracks_ Categories.Category_id = 
somevalue or AudioTracks_ Categories.Category_id = somevalue...

Now the question is, how can I handle an AND query, I mean how can I 
have returned only the AudioTrack records that belongs to ALL the 
Category IDs I put in the query?

Hope the question was clear...   :)

thanks in advance for your answer,

   Giulio




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: insert: auto increment field

2004-01-04 Thread Larry Brown
I like naming the fields...

insert into product (
NumUsers,DataConnect,Type,NumRouters,NumSwitches,AvgServiceCallsWk ) values
( '456789','t1','new',2,2,10 )

I use php on a large web app that from time to time I have to add a field to
a table.  If I use the above syntax instead of w/o field names, by adding a
field to the db it breaks my insert pages.  So if I have 15 pages that
insert into that table I have to go to each one and change the code.  By
referencing the names as above, when you add a new field to the table, you
get no errors.  Of course this is only helpfull when the new field isn't
something that those 15 php pages needs to add, but that happens all the
time and saves me a bit of work.

Hope that helps..

Larry

-Original Message-
From: Mike Mapsnac [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 10:09 AM
To: [EMAIL PROTECTED]
Subject: insert: auto increment field


I have table with 7 fields. First field is id (auto increment). As I
understand the value should start from 0 and  next value will auto
increment.

And I shouldn't add insert the value. So the insert
statemens below gives me an error. ERROR 1136:Column count doesn't match
value count at row 1

insert into product values('456789','t1', 'new', 2, 2, 10);

_
Have fun customizing MSN Messenger — learn how here!
http://www.msnmessenger-download.com/tracking/reach_customize


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Help:)

2004-01-04 Thread Larry Brown
try...

update user set password=PASSWORD('xx') where user='root' and
host='localhost';

(replacing the x's with the password)

Larry

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 11:32 AM
To: [EMAIL PROTECTED]
Subject: RE: Help:)


Thank you very much for the prompt reply.
Yes you were correct, it was the fact that the password had not been
entered at all...I did the
mysql -u root -p
when prompted for the password I just hit enter and was able to get in.

Now I have to figure out why its not accepting the password.  I type the
following command as root in mysql:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 3.23.49-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql SET PASSWORD FOR 'root'@'localhost' = PASSWORD 'xx'

This is exactly how I typed it in...(just copied and pasted)
When I hit enter with that password...I just get a prompt...no
confirmation the password was accepted or anything.
Did I type in the command for the pass wrong?
Don

-Original Message-
From: Michael Stassen [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 2:40 AM
To: robert_rowe
Cc: [EMAIL PROTECTED]; Don Matlock
Subject: Re: Help:)


robert_rowe wrote:
 Issuing this command:


mysqlSET PASSWORD FOR 'root'@'localhost' = PASSWORD xx

 set your password to xx

I'm not so sure.  PASSWORD is a function which expects a string.  The
correct syntax is

   SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password')

so I don't believe this worked unless Don is misquoting what he did.

 You will need to use

 mysql -u root -p xx

This will not work.  You may not put a space between the -p and the
password.  The space indicates that xx is the db to use.  If you

want to provide the password on the command line (not really a good
idea), the syntax is

   mysql -u root -pxx

See, no space between the -p and the password.

 from the local machine to get access with the root user.

 This:

 mysql -u root -p

 is specifying a blank password.

No, it is not.  The -p indicates you want to give a password to
authenticate.  Since you didn't provide the password on the command
line, mysql will prompt you for it.


 I believe that this:

 mysql -u root

 will prompt you for the password without echoing it to the screen.

No.  This will try to authenticate without a password, which will only
work if the specified user (root, in this case) has no password.

Don,

I expect that when you enter `mysql -u root -p`, you get prompted for a
password and then get an error message.  It would help if you would
please post the exact text of the error message.  In the meantime, try
your old password (or no password, `mysql -u root`, if root didn't have
one before), in case the SET PASSWORD failed.

Alternatively, take a look at How to Reset a Forgotten Root Password
http://www.mysql.com/doc/en/Resetting_permissions.html in the manual
for the directions on how to use --skip-grant-tables to recover your
root mysql password.

Michael




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql 5.0

2004-01-04 Thread Gerald R. Jensen
Jamie:

I don't think your problem has anything to do with version 5.0 ... though
there have been some enhancements in security and user privs, the
fundamentals (IMHO) have not changed.

The problem is most likely with the application itself ... it needs to pass
the user ID and password, and the user ID needs to have been granted the
correct privs.

G. R. Jensen

- Original Message - 
From: jamie murray [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 9:22 AM
Subject: mysql 5.0


Hi guys,
I posted a similar question on this the other day but received no answers.
I'm running 5.0 and have a possible security/password  problem. If i run
from command line all users work with or without passwords.
If I try and connect to mysql through php,perl,python or odbc with a user
that has a password I get client authentication protocol error.
If I connect with any of the above with a user who has no password
everything works fine.
Does this have to do with 5.0 change to the password hash.
 If you have advice to offer it would be greatly appreciated.

Thanks!



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Help:)

2004-01-04 Thread Bruce Ferrell
you need a smeicolon at the end of the line

Don Matlock wrote:
Thank you very much for the prompt reply.
Yes you were correct, it was the fact that the password had not been
entered at all...I did the 
mysql -u root -p
when prompted for the password I just hit enter and was able to get in.

Now I have to figure out why its not accepting the password.  I type the
following command as root in mysql:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 3.23.49-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql SET PASSWORD FOR 'root'@'localhost' = PASSWORD 'xx'

This is exactly how I typed it in...(just copied and pasted)
When I hit enter with that password...I just get a prompt...no
confirmation the password was accepted or anything.
Did I type in the command for the pass wrong?
Don
-Original Message-
From: Michael Stassen [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 04, 2004 2:40 AM
To: robert_rowe
Cc: [EMAIL PROTECTED]; Don Matlock
Subject: Re: Help:)

robert_rowe wrote:

Issuing this command:



mysqlSET PASSWORD FOR 'root'@'localhost' = PASSWORD xx
set your password to xx


I'm not so sure.  PASSWORD is a function which expects a string.  The 
correct syntax is

   SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password')

so I don't believe this worked unless Don is misquoting what he did.


You will need to use 

mysql -u root -p xx


This will not work.  You may not put a space between the -p and the 
password.  The space indicates that xx is the db to use.  If you

want to provide the password on the command line (not really a good 
idea), the syntax is

   mysql -u root -pxx

See, no space between the -p and the password.


from the local machine to get access with the root user.

This:

mysql -u root -p

is specifying a blank password.


No, it is not.  The -p indicates you want to give a password to 
authenticate.  Since you didn't provide the password on the command 
line, mysql will prompt you for it.


I believe that this:

mysql -u root 

will prompt you for the password without echoing it to the screen.


No.  This will try to authenticate without a password, which will only 
work if the specified user (root, in this case) has no password.

Don,

I expect that when you enter `mysql -u root -p`, you get prompted for a 
password and then get an error message.  It would help if you would 
please post the exact text of the error message.  In the meantime, try 
your old password (or no password, `mysql -u root`, if root didn't have 
one before), in case the SET PASSWORD failed.

Alternatively, take a look at How to Reset a Forgotten Root Password 
http://www.mysql.com/doc/en/Resetting_permissions.html in the manual 
for the directions on how to use --skip-grant-tables to recover your 
root mysql password.

Michael






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: insert: auto increment field

2004-01-04 Thread Donald Henson
(You forgot to post this to the list.)

Check to make sure you have the ID field set as autoincrement. By the
way, duplicate entry is not the same thing as column count not matching.
Also check to see if you have any other fields set as unique.

On Sun, 2004-01-04 at 09:12, Mike Mapsnac wrote:
 I just tried.. Same problem with
 Duplicate Entry
 
 
 From: Donald Henson [EMAIL PROTECTED]
 To: MySQL List [EMAIL PROTECTED]
 Subject: Re: insert: auto increment field
 Date: Sun, 04 Jan 2004 08:44:56 -0700
 
 On Sun, 2004-01-04 at 08:09, Mike Mapsnac wrote:
   I have table with 7 fields. First field is id (auto increment). As I
   understand the value should start from 0 and  next value will auto
   increment.
  
   And I shouldn't add insert the value. So the insert
   statemens below gives me an error. ERROR 1136:Column count doesn't match
   value count at row 1
  
   insert into product values('456789','t1', 'new', 2, 2, 10);
 
 Try using NULL for the id field, thusly:
 
 insert into product values (NULL,'456789','t1','new',2,2,10);
 
 I didn't actually try this but it should work.
 
 Don Henson
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 _
 Take advantage of our limited-time introductory offer for dial-up Internet 
 access. http://join.msn.com/?page=dept/dialup


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Fwd: insert: auto increment field

2004-01-04 Thread Steve Folly
Forwarded to the list for the benefit of all...

Begin forwarded message:

From: Mike Mapsnac [EMAIL PROTECTED]
Date: 4 January 2004 15:42:33 GMT
To: [EMAIL PROTECTED]
Subject: Re: insert: auto increment field
I use both metods and they works  But when I make another insert I 
receive a message
ERROR: 1062 Duplicate entry '2147483647' for key 1.

Why id (primaty , and auto increment) start from 2147483647 and not 
from 0 or 1

Thanks



From: Steve Folly [EMAIL PROTECTED]
To: MySQL MySQL [EMAIL PROTECTED]
Subject: Re: insert: auto increment field Date: Sun, 4 Jan 2004 
15:27:47 +

On 4 Jan 2004, at 15:09, Mike Mapsnac wrote:

I have table with 7 fields. First field is id (auto increment). As I 
understand the value should start from 0 and  next value will auto 
increment.

And I shouldn't add insert the value. So the insert
statemens below gives me an error. ERROR 1136:Column count doesn't 
match value count at row 1

insert into product values('456789','t1', 'new', 2, 2, 10);
Two options:

Use NULL as the value for the auto-increment column. (Probably the 
easiest method!)
(side note: you can then retrieve the real value with 
LAST_INSERT_ID() function)

Or, specify the column names in your query as well, so MySQL can tie 
up columns and values:

insert into product (col2, col3, col4, col5, col6) 
values('456789','t1', 'new', 2, 2, 10)

Without column names, it expects there to be values for all columns. 
So in your case, just don't specify the auto-increment column.

HTH
Steve.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

_
Enjoy a special introductory offer for dial-up Internet access — 
limited time only! http://join.msn.com/?page=dept/dialup



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: mysql 5.0

2004-01-04 Thread jamie murray
I have to disagree based on whats happening but I hope you can prove me
wrong.
(maybe I'm making some simple mistake and you can correct me very quickly
please look below)

For example
 if I do   -   grant all privileges on *.* to [EMAIL PROTECTED]
identified by 'somenewpassword;
 I can access mysql from command line but nothing
else(php,perl,odbc,python etc...)

here is my odbc errer: [mysql][ODBC 3.51 driver] client does not support
authentication protocol requested by server;
  consider upgrading mysql client;

the thing is this is all being done on the server(there is no workstation
accessing the database i run all programs server side)
 and the only install is 5.0.
Also if this is a client problem why does it work when i create users with
no passwords as shown below.


if I do - grant all privileges on *.* to [EMAIL PROTECTED] ;
I can access mysql from command line and these -(php,perl,odbc,python
etc...)


- Original Message - 
From: Gerald R. Jensen [EMAIL PROTECTED]
To: jamie murray [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 2:05 PM
Subject: Re: mysql 5.0


 Jamie:

 I don't think your problem has anything to do with version 5.0 ... though
 there have been some enhancements in security and user privs, the
 fundamentals (IMHO) have not changed.

 The problem is most likely with the application itself ... it needs to
pass
 the user ID and password, and the user ID needs to have been granted the
 correct privs.

 G. R. Jensen

 - Original Message - 
 From: jamie murray [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Sunday, January 04, 2004 9:22 AM
 Subject: mysql 5.0


 Hi guys,
 I posted a similar question on this the other day but received no answers.
 I'm running 5.0 and have a possible security/password  problem. If i run
 from command line all users work with or without passwords.
 If I try and connect to mysql through php,perl,python or odbc with a user
 that has a password I get client authentication protocol error.
 If I connect with any of the above with a user who has no password
 everything works fine.
 Does this have to do with 5.0 change to the password hash.
  If you have advice to offer it would be greatly appreciated.

 Thanks!




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Thank you

2004-01-04 Thread Don Matlock
Thanks all for the help...thats what it was...the ;

Now I need to tighten up the security on it...I am going to install
phpmyadmin...

Don



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql 5.0

2004-01-04 Thread Michael Stassen
Password security was improved in version 4.1 by widening the password 
field (from 16 bytes to over 40).  This is documented in the manual 
http://www.mysql.com/doc/en/Password_hashing.html.  Clients compiled 
to work with versions of mysql prior to 4.1 give the behavior you 
describe when attemting to connect to mysql servers from 4.1 on.  The 
manual describes some workarounds.

Michael

jamie murray wrote:
I have to disagree based on whats happening but I hope you can prove me
wrong.
(maybe I'm making some simple mistake and you can correct me very quickly
please look below)
For example
 if I do   -   grant all privileges on *.* to [EMAIL PROTECTED]
identified by 'somenewpassword;
 I can access mysql from command line but nothing
else(php,perl,odbc,python etc...)
here is my odbc errer: [mysql][ODBC 3.51 driver] client does not support
authentication protocol requested by server;
  consider upgrading mysql client;
the thing is this is all being done on the server(there is no workstation
accessing the database i run all programs server side)
 and the only install is 5.0.
Also if this is a client problem why does it work when i create users with
no passwords as shown below.
if I do - grant all privileges on *.* to [EMAIL PROTECTED] ;
I can access mysql from command line and these -(php,perl,odbc,python
etc...)
- Original Message - 
From: Gerald R. Jensen [EMAIL PROTECTED]
To: jamie murray [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 2:05 PM
Subject: Re: mysql 5.0



Jamie:

I don't think your problem has anything to do with version 5.0 ... though
there have been some enhancements in security and user privs, the
fundamentals (IMHO) have not changed.
The problem is most likely with the application itself ... it needs to
pass

the user ID and password, and the user ID needs to have been granted the
correct privs.
G. R. Jensen

- Original Message - 
From: jamie murray [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 9:22 AM
Subject: mysql 5.0

Hi guys,
I posted a similar question on this the other day but received no answers.
I'm running 5.0 and have a possible security/password  problem. If i run
from command line all users work with or without passwords.
If I try and connect to mysql through php,perl,python or odbc with a user
that has a password I get client authentication protocol error.
If I connect with any of the above with a user who has no password
everything works fine.
Does this have to do with 5.0 change to the password hash.
If you have advice to offer it would be greatly appreciated.
Thanks!







--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Help:)

2004-01-04 Thread Michael Stassen
Manually editing the user table as Larry describes will work, but is not 
the preferred method.  In particular, the new password set this way will 
not take effect until you either FLUSH PRIVILEGES.  Using SET, as Don is 
trying to do, or GRANT will set the password and make it take effect 
immediately.

Don, mysql didn't respond because it was waiting for the ; to finish the 
command.  Also, the parens are required.  You need to enter

  SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password');

at the mysql prompt.  You should get a response like

  Query OK, 0 rows affected (0.02 sec)

followed by a new prompt.

Michael

Larry Brown wrote:

try...

update user set password=PASSWORD('xx') where user='root' and
host='localhost';
(replacing the x's with the password)

Larry

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 11:32 AM
To: [EMAIL PROTECTED]
Subject: RE: Help:)
Thank you very much for the prompt reply.
Yes you were correct, it was the fact that the password had not been
entered at all...I did the
mysql -u root -p
when prompted for the password I just hit enter and was able to get in.
Now I have to figure out why its not accepting the password.  I type the
following command as root in mysql:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 3.23.49-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql SET PASSWORD FOR 'root'@'localhost' = PASSWORD 'xx'

This is exactly how I typed it in...(just copied and pasted)
When I hit enter with that password...I just get a prompt...no
confirmation the password was accepted or anything.
Did I type in the command for the pass wrong?
Don
-Original Message-
From: Michael Stassen [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 2:40 AM
To: robert_rowe
Cc: [EMAIL PROTECTED]; Don Matlock
Subject: Re: Help:)
robert_rowe wrote:

Issuing this command:



mysqlSET PASSWORD FOR 'root'@'localhost' = PASSWORD xx
set your password to xx


I'm not so sure.  PASSWORD is a function which expects a string.  The
correct syntax is
   SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password')

so I don't believe this worked unless Don is misquoting what he did.


You will need to use

mysql -u root -p xx


This will not work.  You may not put a space between the -p and the
password.  The space indicates that xx is the db to use.  If you
want to provide the password on the command line (not really a good
idea), the syntax is
   mysql -u root -pxx

See, no space between the -p and the password.


from the local machine to get access with the root user.

This:

mysql -u root -p

is specifying a blank password.


No, it is not.  The -p indicates you want to give a password to
authenticate.  Since you didn't provide the password on the command
line, mysql will prompt you for it.

I believe that this:

mysql -u root

will prompt you for the password without echoing it to the screen.


No.  This will try to authenticate without a password, which will only
work if the specified user (root, in this case) has no password.
Don,

I expect that when you enter `mysql -u root -p`, you get prompted for a
password and then get an error message.  It would help if you would
please post the exact text of the error message.  In the meantime, try
your old password (or no password, `mysql -u root`, if root didn't have
one before), in case the SET PASSWORD failed.
Alternatively, take a look at How to Reset a Forgotten Root Password
http://www.mysql.com/doc/en/Resetting_permissions.html in the manual
for the directions on how to use --skip-grant-tables to recover your
root mysql password.
Michael



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: SQL syntax? [Select within Insert]

2004-01-04 Thread Michael Stassen
As I understand it, you don't really want the MAX(Student_ID), you want 
the actual Student_ID of the last insert.  It is important to note that 
they are not necessarily the same.  If you insert Student 24, then I 
insert Student 25, then you check MAX(Student_ID), you will get 25, not 
24.  Hence, you'll end up using the wrong value.  Also, some table types 
 will reuse IDs from deleted rows.

Fortunately, mysql provides a solution.  The LAST_INSERT_ID() function 
returns the most recent AUTO_INCREMENT value.  It is also 
connection-specific, so it is not affected by what someone else is 
doing.  So, your second statement should be

  INSERT INTO Extra_Credit (Student_ID, Points)
  VALUES (LAST_INSERT_ID(), 25)
Michael

EP wrote:

Struggling to get an INSERT to work, can anyone help?

Here's my scenario:

Students[table]

Student_ID[primary key, auto-increment]
Student_name
Student_sex
Extra_Credit[table]

EC_ID [primary key, auto-increment]
Student_ID
Points
First:  INSERT INTO Students (Student_name, Student_sex) VALUES('Josh 
Baxter, M);

[suceeds]

Then:  INSERT INTO Extra_Credit (Student_ID, Points) SELECT 
MAX(Student_ID) from Students,

(1)...VALUE ('25');

or

(2)... '25' as Points;

Either one fails... Any hints on syntax to achieve the insert (pulling 
the Student_ID in from the just modified record in the Students table)?

TIA!

Eric Pederson







--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: mysql 5.0

2004-01-04 Thread jamie murray
Hi Michael,
Thanks for the reply and link my problem is solved also thanks to all others
who took the time to reply.
I shortened the password column in the user table as recommended by the
mysql doc and I can now connect as usual.
I feel silly for missing this but oh well live and learn I guess.

cheers!



- Original Message - 
From: Michael Stassen [EMAIL PROTECTED]
To: jamie murray [EMAIL PROTECTED]
Cc: Gerald R. Jensen [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 3:05 PM
Subject: Re: mysql 5.0


 Password security was improved in version 4.1 by widening the password
 field (from 16 bytes to over 40).  This is documented in the manual
 http://www.mysql.com/doc/en/Password_hashing.html.  Clients compiled
 to work with versions of mysql prior to 4.1 give the behavior you
 describe when attemting to connect to mysql servers from 4.1 on.  The
 manual describes some workarounds.

 Michael

 jamie murray wrote:
  I have to disagree based on whats happening but I hope you can prove me
  wrong.
  (maybe I'm making some simple mistake and you can correct me very
quickly
  please look below)
 
  For example
   if I do   -   grant all privileges on *.* to [EMAIL PROTECTED]
  identified by 'somenewpassword;
   I can access mysql from command line but nothing
  else(php,perl,odbc,python etc...)
 
  here is my odbc errer: [mysql][ODBC 3.51 driver] client does not
support
  authentication protocol requested by server;
consider upgrading mysql client;
 
  the thing is this is all being done on the server(there is no
workstation
  accessing the database i run all programs server side)
   and the only install is 5.0.
  Also if this is a client problem why does it work when i create users
with
  no passwords as shown below.
 
 
  if I do - grant all privileges on *.* to [EMAIL PROTECTED] ;
  I can access mysql from command line and these -(php,perl,odbc,python
  etc...)
 
 
  - Original Message - 
  From: Gerald R. Jensen [EMAIL PROTECTED]
  To: jamie murray [EMAIL PROTECTED];
[EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Sent: Sunday, January 04, 2004 2:05 PM
  Subject: Re: mysql 5.0
 
 
 
 Jamie:
 
 I don't think your problem has anything to do with version 5.0 ...
though
 there have been some enhancements in security and user privs, the
 fundamentals (IMHO) have not changed.
 
 The problem is most likely with the application itself ... it needs to
 
  pass
 
 the user ID and password, and the user ID needs to have been granted the
 correct privs.
 
 G. R. Jensen
 
 - Original Message - 
 From: jamie murray [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Sunday, January 04, 2004 9:22 AM
 Subject: mysql 5.0
 
 
 Hi guys,
 I posted a similar question on this the other day but received no
answers.
 I'm running 5.0 and have a possible security/password  problem. If i run
 from command line all users work with or without passwords.
 If I try and connect to mysql through php,perl,python or odbc with a
user
 that has a password I get client authentication protocol error.
 If I connect with any of the above with a user who has no password
 everything works fine.
 Does this have to do with 5.0 change to the password hash.
  If you have advice to offer it would be greatly appreciated.
 
 Thanks!
 
 
 
 
 


 -- 
 MySQL Windows Mailing List
 For list archives: http://lists.mysql.com/win32
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Problem Solved - AND - How to decide when to upgade a production server MySQL

2004-01-04 Thread Michael Stassen
I've faced the same questions you raise here.  Some things which occur 
to me:

First, are you certain that 4.0.5a is working perfectly?  A lot of 
bugs have been fixed since then.  Is it possible you just haven't seen them?

I would start by reading the change history in the manual 
http://www.mysql.com/doc/en/News.html.  For each revision from 4.0.5 
to 4.0.17 there is a page of changes.  I'd pay particular attention to 
the list of fixed bugs.  Note that there is also a page documenting 
changes in the not-yet-released 4.0.18.  That could give you a heads up 
on any bugs in 4.0.17.  There's also this list.

Then, it seems to me, you are faced with the usual administrator 
dilemma: What are the odds and consequences of hitting a known bug 
versus the odds and consequences of hitting a new, unknown bug?  I'm not 
sure there's a simple, one-size-fits-all answer to that.  I suspect that 
most managers would not be sympathetic when bitten by a known bug that 
you chose not to fix.  On the other hand, once bitten, known bugs are 
easier to fix (upgrade) than new ones.  And, of course, if your 
application is so critical that you stop everything else and test for a 
month (or six) before rolling out a server upgrade, then you can't 
practically upgrade every time a new version comes out.

In your case, consider that your testing environment (more or less 
latest) is increasingly unlike your production environment (4.0.5a). 
Hence, it seems to me, the quality of your testing is decreasing.  The 
problem you ran into here seems to me to be a symptom of that.  If you 
won't be upgrading the production server, you probably ought to revert 
the test box to the same version.  I doubt you want to do that, though.

A better idea might be to decide how much testing must be done before 
you put a new version of the server into production, including how long 
it will take.  Then decide how often you are willing to do that.  Every 
6 weeks?  Quarterly?  Once a year?  Say you decide on quarterly upgrades 
with 1 month of testing.  Then you could put the latest mysql on your 
test box 6 weeks before the quarterly upgrade date and test.  You don't 
upgrade the server on the test box during the test period, unless a new 
version has a critical bug fix (security or data corruption), in which 
case you restart the test clock.  The key here, I think, is to make sure 
that your testing method and timing makes you confident that upgrading 
the production server will work.  If not, I suggest the problem lies 
with the testing scheme rather than with the upgrade.

There are a lot of good administrators on this list. Perhaps someone 
else will add to that or suggest a better way.

Michael

Richard S. Huntrods wrote:

My problem with deletes/inserts corrupting the database table has been 
resolved. I was using version 4.0.15, and the very bug I experienced was 
reported for version 4.0.14. As of 4.0.17, it is fixed. Interestingly, 
the bug does not appear in 4.0.5a on my Solaris box.

Which brings me to my more global (a.k.a. of importance to many 
persons using MySQL) question...

When do you justify upgrading to a new version of MySQL on a production 
server?

I've been upgrading MySQL versons pretty regularly on my development 
machine. Not every time, but about every quarter (3 months). Until this 
particular bug, I've never had a big problem with the devel version 
being newer than the production version. (in this case, the bug was 
discovered during my servlet junit tests, and so prevented me from 
distributing the new code until I had resolved the problem).

However, because the current production version I'm using (4.0.5a on 
Solaris SPARC 2.8) is working perfectly, I am very reluctant to upgrade 
the production version unless I have a good reason to do so. The problem 
is that I'm at a loss to explain what a good reason might be. :-)

How do those of you using MySQL in production mode make your upgrade 
decisions? As a related question, what version would you run on a 
Solaris 2.8 (SPARC) server?

Cheers,

-Richard






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Binary Log replay utility?

2004-01-04 Thread Sam Vilain
No-one out there doing step-by-step replay of binary logs ?

On Tue, 30 Dec 2003 17:52, Sam Vilain wrote;

   Hi there,
   
   Is there a utility out there to do transaction-at-a-time view and/or
   replay with MySQL's binary log ?  Primarily for audit / debug
   purposes.
   
   I'm only interested in using it with the proper database back-end, not
   ISAM.

-- 
Sam Vilain, [EMAIL PROTECTED]

Bible Misinterpretations # 3: Motorcycles
  The roar of David's Triumph was heard through out the land...



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Extracting images from blob fields.

2004-01-04 Thread Richard Davies
I have a small single user database into which I wish to insert and extract 
images.

From the manual this seems to work to insert the image

insert into images values(LOAD_FILE(/home/richard/scan.tiff));

but how do I get it back again?

I thought this might work but it doesn't

select * into outfile /home/richard/image.tiff from images;

Note this is an experimental database having at present only one table with 
one field in the table and one record in the database.

The file image.tiff seems to be full of escape characters when viewed with a 
binary editor.

I can find nothing in the manual about how to retrieve the image and searching 
on the web only gives suggestions using perl, php etc to serve it to a web 
page but I don't have perl, php, apache etc I just want to extract the image 
and look at it with image magic or similar.

Any advice will be greatly appreciated.

-- 
Regards

Richard


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL certification

2004-01-04 Thread Douglas Sims
I'm scheduled to take the MySQL certification exam tomorrow morning, 
thus currently intently cramming with the MySQL reference manual and 
writing out study notes etc.

I'm not too worried as I've been using MySQL for years (although preping 
for this has been a good exercise and I've learned a number of useful 
things so far) but I wonder if anyone on this list has thoughts in 
general about the certification test or has taken this test and would 
like to offer any tips, hints, or cautions?

If I do well on the test tomorrow, perhapas I'll post my study notes 
on-line; otherwise I may change my name, retire to the countryside and 
take up raising mangel-wurzels.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


connecion error

2004-01-04 Thread Cres Justado
Hi!

I am new in using mysql database server. I have installed MySQL Database 
server on redhat advance server. But when I try to access the database 
server using a the mysql client software for windows it gives an error Host 
my IP Address is not allowed to connect to this MySQL Server.. How will I 
solve this problem?



Thanks,

Cres

_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Scheduling app examples ???

2004-01-04 Thread Michael D Schleif
I am designing an web based application using MySQL and Perl.  Part of
the requirements include a somewhat complex scheduling module, which
must accommodate scheduling multiple human and physical resources across
multiple facilities.  For example, medical patients will be scheduled
for one or more pieces of equipment, in one or more rooms, at one or
more facilities, by one or more doctors -- per visit.

I would love to review how others have handled such tasks; but, I have
reviewed the MySQL archives and googled without success.

I am especially interested in the database design, since requirements
indicate a need to schedule forward more than one year.  I feel that a
robust database design will simplify the logic code to make this work
optimally.

What do you think?

-- 
Best Regards,

mds
mds resource
877.596.8237
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--


pgp0.pgp
Description: PGP signature


RE: connecion error

2004-01-04 Thread Larry Brown
what command are you using to connect to the server?

-Original Message-
From: Cres Justado [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 3:43 PM
To: [EMAIL PROTECTED]
Subject: connecion error


Hi!


I am new in using mysql database server. I have installed MySQL Database
server on redhat advance server. But when I try to access the database
server using a the mysql client software for windows it gives an error Host
my IP Address is not allowed to connect to this MySQL Server.. How will I
solve this problem?




Thanks,

Cres

_
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



General Question on Upgrading

2004-01-04 Thread [EMAIL PROTECTED]
I got version 3.23.56 of mysql with my redhat installation as an rpm 
package and now want to upgrade to the latest 4 version. My question is: 
how I can upgrade my current installation myself without going through 
the rpm package installer?

Thanks,

-Jalil

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: connecion error

2004-01-04 Thread robert_rowe

It sounds like you need to set up your security permissions. See the section of the 
manual on grant:

http://www.mysql.com/doc/en/GRANT.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Newbie: need form to input records View report

2004-01-04 Thread Ligaya Turmelle
I noticed you got a lot of feed back. Another site to take a look at for php
is www.codewalkers.com. They have some excellent tutorials. And as a forum
to ask questions in I would recommend www.phphelp.com. I have been to
sitepoint and it is a good site but I prefer these for my php development.

Life is a game... So have fun.

Ligaya

[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 If you want to build something like a web form you will need to use HTML
and a
 scripting language. A common solution to do what you are asking is to use
PHP.
 You will need to be familiar with PHP to go further. Go to
http://www.php.net
 to get a hold of the basics.

 There is no way to write a walkthrough for your problem here as it would
be
 quite long :o). It would also be repititive since there are millions of
sites
 that provide such walkthroughs. Go to www.sitepoint.com, which is a web
dev
 portal. My favortite. They have tons of usefull articles and step by step
 walkthroughs.

 From a big picture point of view what you need to do is use PHP to
generate
 HTML dynamically and handle application logic, database interactivity. Use
the
 MySQL database as your data store [obviously ;)]. PHP is an excellent
choice
 as it works very well with MySQL.

 If this sounds like greek then don't worry too much. Head to sitepoint.com
and
 go to the php section and start learning. It is an excellent resource.
PHP.net
 is a good place too although you might want to go to sitepoint first.

 Best of luck,

 Arjun

 Quoting Troy T. Hall [EMAIL PROTECTED]:

  I know this sounds stupid but I'm totally lost.
  I've created a MySQL DB whose purpose is to track customers who have not
  gotten a newspaper.
  I've created all the necessary fields, and have managed to learn how to
  add/delete/modify the records in mysqlcc, but what I want is to have a
  predesigned form like you'd find on a webpage where you simply enter the
  complaints and hit submit or whatever, and it responds with the
complaint ID
  # ( ComplaintID is an autoincrement field in the db )  Then I need to be
  able to print a report in a nicely labeled/readable format showing all
  entries made that day where the chargeable field is not List
(Chargeable
  is an enum consisting of yes, no, list).
 
  Will someone please be kind enough to point me in the right direction.
I
  can't seem to get my head around this concept.
 
  Troy
  oh, if it matters, I'm using Linux Mandrake 9.2 with the Gnome 2.0 GDM.
I
  also have qtDesigner, OO,  Screem.
 
 
 
 
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 






-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Extracting images from blob fields.

2004-01-04 Thread robert_rowe

You need to select into dumpfile instead of outfile. See the section of the manual on 
select syntax:

http://www.mysql.com/doc/en/SELECT.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: General Question on Upgrading

2004-01-04 Thread Arne K. Haaje
søndag 04. januar 2004, 22:45, skrev [EMAIL PROTECTED]:
 I got version 3.23.56 of mysql with my redhat installation as an rpm
 package and now want to upgrade to the latest 4 version. My question is:
 how I can upgrade my current installation myself without going through
 the rpm package installer?

 Thanks,

 -Jalil

I guess you can install the tarball in /usr/local. You will then have a 
directory called something like mysql-standard-4.0.17-pc-linux-i686. Make a 
symlink to it call mysql so you will have /usr/local/mysql

Inside that directory remove the data directory, and make a symlink called 
data to the directory where you have your databases for the old installation. 
When the new database is up and running you need to run 
mysql_fix_privilege_tables since there has been some changes since 3.23

This is a *very* rough description that may not suit you setup, but it should 
give you some ideas. See the README and INSTALL-BINARY files in the tarball.

Regards,

Arne
-- 

Arne K. Haaje   | www.drlinux.no
Bregneveien 9   | 
1825 Tomter | M: 92 88 44 66


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Perl DBD::mysql failed :(

2004-01-04 Thread Aleksei Wolff
I am on suse 9.0.

using cpan perl module (perl -MCPAN -e shell)
and install DBD::mysql

obtained the following error:

An error occurred while linking the DBD::mysql
driver.  The error message seems to indicate that you
dont have a libz.a or a libza.so

Can anybody suggest a possible fix?


Thanks in advance folks!!

__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: insert: auto increment field

2004-01-04 Thread Mike Mapsnac
I use both metods and they works  But when I make another insert I receive a 
message
ERROR: 1062 Duplicate entry '2147483647' for key 1.

Why id (primaty , and auto_increment) start from 2147483647 and not from 0 
or 1

Thanks


From: Donald Henson [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Subject: Re: insert: auto increment field
Date: Sun, 04 Jan 2004 08:44:56 -0700
On Sun, 2004-01-04 at 08:09, Mike Mapsnac wrote:
 I have table with 7 fields. First field is id (auto increment). As I
 understand the value should start from 0 and  next value will auto
 increment.

 And I shouldn't add insert the value. So the insert
 statemens below gives me an error. ERROR 1136:Column count doesn't match
 value count at row 1

 insert into product values('456789','t1', 'new', 2, 2, 10);
Try using NULL for the id field, thusly:

insert into product values (NULL,'456789','t1','new',2,2,10);

I didn't actually try this but it should work.

Don Henson



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
_
Get reliable dial-up Internet access now with our limited-time introductory 
offer.  http://join.msn.com/?page=dept/dialup

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


MYsql wont start

2004-01-04 Thread Don Matlock
Hi all,
I was able to get mysql up and running and installed phpBB to boot.
Upons reboot I noticed that the mysql daemon was timing out...when I log
into it this is the error I get:

[EMAIL PROTECTED] root]# mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
[EMAIL PROTECTED] root]#

(p.s. x's are me hiding my ip address)

Any thoughts?

Don



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: MYsql wont start

2004-01-04 Thread Larry Brown
The error is just telling you the server isn't there.  Is this RH?
If it is run..

#service mysqld restart

and see what messages you get if any and also check /var/log/mysqld.log and
see what messages it is giving.  If it shows it started correctly, connect
from the command line before doing anything with phpBB and make sure you can
get around.  Otherwise you won't be able to tell if the problem is from
phpBB or from mysqld.

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 7:01 PM
To: [EMAIL PROTECTED]
Subject: MYsql wont start


Hi all,
I was able to get mysql up and running and installed phpBB to boot.
Upons reboot I noticed that the mysql daemon was timing out...when I log
into it this is the error I get:

[EMAIL PROTECTED] root]# mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
[EMAIL PROTECTED] root]#

(p.s. x's are me hiding my ip address)

Any thoughts?

Don



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Oracle nvl function equivalent.

2004-01-04 Thread Arun Natarajan
Hello All,
Is there an equivalent to the nvl() function of Oracle available in MySql. I
am currently using version 4.1 alpha and am trying to execute the following
query:
Select count(nvl(col1,1)) as col1 from table1 group by col1;

Also, I tried to create a user defined function as below, but it failed.
Could some one help me out here?

Create Function nvl(fieldVal INTEGER(10)) RETURNS INTEGER(10)
BEGIN
If fieldVal==null Then
return 1;
else
return fieldVal;
END

Regards,
Arun N


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: insert: auto increment field

2004-01-04 Thread Larry Brown
Is this a test db?  If so go ahead and drop your records so there are none
in there and start entering them and checking their id as you do.  After
dropping all records it should start back at 1 and increment forward.  I
don't know how the index went up to max for that field.  Perhaps something
during previous tests.  If you can't drop the current records document that
in your reply and maybe someone else can give another suggestion.

-Original Message-
From: Mike Mapsnac [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 6:53 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: insert: auto increment field


I use both metods and they works  But when I make another insert I receive a
message
ERROR: 1062 Duplicate entry '2147483647' for key 1.

Why id (primaty , and auto_increment) start from 2147483647 and not from 0
or 1

Thanks


From: Donald Henson [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Subject: Re: insert: auto increment field
Date: Sun, 04 Jan 2004 08:44:56 -0700

On Sun, 2004-01-04 at 08:09, Mike Mapsnac wrote:
  I have table with 7 fields. First field is id (auto increment). As I
  understand the value should start from 0 and  next value will auto
  increment.
 
  And I shouldn't add insert the value. So the insert
  statemens below gives me an error. ERROR 1136:Column count doesn't match
  value count at row 1
 
  insert into product values('456789','t1', 'new', 2, 2, 10);

Try using NULL for the id field, thusly:

insert into product values (NULL,'456789','t1','new',2,2,10);

I didn't actually try this but it should work.

Don Henson



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


_
Get reliable dial-up Internet access now with our limited-time introductory
offer.  http://join.msn.com/?page=dept/dialup


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: insert: auto increment field

2004-01-04 Thread Mike Mapsnac
I delete all records from the table and cannot insert second element to the 
table. Auto increment starts with higher number ..

ERROR 1062: Duplicate entry '2147483647' for key 1

From: Larry Brown [EMAIL PROTECTED]
To: Mike Mapsnac [EMAIL PROTECTED],MySQL List 
[EMAIL PROTECTED]
Subject: RE: insert: auto increment field
Date: Sun, 4 Jan 2004 19:09:59 -0500

Is this a test db?  If so go ahead and drop your records so there are none
in there and start entering them and checking their id as you do.  After
dropping all records it should start back at 1 and increment forward.  I
don't know how the index went up to max for that field.  Perhaps something
during previous tests.  If you can't drop the current records document that
in your reply and maybe someone else can give another suggestion.
-Original Message-
From: Mike Mapsnac [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 6:53 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: insert: auto increment field
I use both metods and they works  But when I make another insert I receive 
a
message
ERROR: 1062 Duplicate entry '2147483647' for key 1.

Why id (primaty , and auto_increment) start from 2147483647 and not from 0
or 1
Thanks

From: Donald Henson [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Subject: Re: insert: auto increment field
Date: Sun, 04 Jan 2004 08:44:56 -0700

On Sun, 2004-01-04 at 08:09, Mike Mapsnac wrote:
  I have table with 7 fields. First field is id (auto increment). As I
  understand the value should start from 0 and  next value will auto
  increment.
 
  And I shouldn't add insert the value. So the insert
  statemens below gives me an error. ERROR 1136:Column count doesn't 
match
  value count at row 1
 
  insert into product values('456789','t1', 'new', 2, 2, 10);

Try using NULL for the id field, thusly:

insert into product values (NULL,'456789','t1','new',2,2,10);

I didn't actually try this but it should work.

Don Henson



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


_
Get reliable dial-up Internet access now with our limited-time introductory
offer.  http://join.msn.com/?page=dept/dialup
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



_
Check your PC for viruses with the FREE McAfee online computer scan.  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: insert: auto increment field

2004-01-04 Thread Daniel Kasak
Larry Brown wrote:

Is this a test db?  If so go ahead and drop your records so there are none
in there and start entering them and checking their id as you do.  After
dropping all records it should start back at 1 and increment forward.  I
don't know how the index went up to max for that field.  Perhaps something
during previous tests.  If you can't drop the current records document that
in your reply and maybe someone else can give another suggestion.
 

Deleting the records isn't sufficient to reset an autoincrement field.
You should do a 'truncate table my_table_name' to reset an autoincrement 
field ( I believe this does a drop table / recreate table process ).

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: MYsql wont start

2004-01-04 Thread Don Matlock
Hi,
Thanx for the prompt reply.
What I did is I told X not to start on boot, so I went into 
/etc/inittab and told it to run at run level 3...thats when mysql
stopped all together.  When I put it back to 5, mysql was running again,
but in the boot up sequence it says it timed out while starting...heres
the output from the command you mentioned:

[EMAIL PROTECTED] root]# service mysqld restart
Stopping MySQL:[  OK  ]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:[FAILED]
[EMAIL PROTECTED] root]#


Heres a quote from the log:


040104 16:11:05  mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
/usr/libexec/mysqld: ready for connections
040104 16:12:06  /usr/libexec/mysqld: Normal shutdown

040104 16:12:06  /usr/libexec/mysqld: Shutdown Complete

040104 16:12:06  mysqld ended

040104 16:16:04  mysqld started


I have done just what the log says and it still fails.

Don


-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 04, 2004 6:06 PM
To: Don Matlock; MySQL List
Subject: RE: MYsql wont start



The error is just telling you the server isn't there.  Is this RH?
If it is run..

#service mysqld restart

and see what messages you get if any and also check /var/log/mysqld.log
and
see what messages it is giving.  If it shows it started correctly,
connect
from the command line before doing anything with phpBB and make sure you
can
get around.  Otherwise you won't be able to tell if the problem is from
phpBB or from mysqld.

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 7:01 PM
To: [EMAIL PROTECTED]
Subject: MYsql wont start


Hi all,
I was able to get mysql up and running and installed phpBB to boot.
Upons reboot I noticed that the mysql daemon was timing out...when I log
into it this is the error I get:

[EMAIL PROTECTED] root]# mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
[EMAIL PROTECTED] root]#

(p.s. x's are me hiding my ip address)

Any thoughts?

Don



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]







-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Error during dbd::mysql

2004-01-04 Thread Aleksei Wolff

I am trying to install the DBI driver for mysql..i got an error which the INSTALL.html 
file says can be fixed by:

 

If this is the case for you, install an RPM archive like libz-devel, libgz-devel, 
zlib-devel or gzlib-devel or something similar.

 

Cam anybody clue me in on what the above pakages (libz-devel, libgz-devel, zlib-devel, 
gzlib-devel) do? how do I install? I am on suse 9.0

 

Thanks.



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Importing dates from access

2004-01-04 Thread Matthew Stuart
I have an access db with populated fields, some of them are date 
fields. One is a created date and another is a updated date. I haven't 
tried it yet, so I am not sure what I will get but I assume that if I 
am asking MySQL to automatically update these fields rather than 
manually have to fill them in, I would lose the correct dates? Will 
MySQL replace the original dates with that of the current date? If so, 
how can I overcome this?

The Access db I have doesn't have any automatic formatting for the date 
fields at the moment, but I want to introduce it in the MySQL version.

Thanks

Mat

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: insert: auto increment field

2004-01-04 Thread Mike Mapsnac
It solved the problem. But what truncate does? Just deletes the rows?



From: Daniel Kasak [EMAIL PROTECTED]
To: Larry Brown [EMAIL PROTECTED],Mike Mapsnac 
[EMAIL PROTECTED], MySQL List [EMAIL PROTECTED]
Subject: Re: insert: auto increment field
Date: Mon, 05 Jan 2004 11:18:08 +1100

Larry Brown wrote:

Is this a test db?  If so go ahead and drop your records so there are none
in there and start entering them and checking their id as you do.  After
dropping all records it should start back at 1 and increment forward.  I
don't know how the index went up to max for that field.  Perhaps something
during previous tests.  If you can't drop the current records document 
that
in your reply and maybe someone else can give another suggestion.


Deleting the records isn't sufficient to reset an autoincrement field.
You should do a 'truncate table my_table_name' to reset an autoincrement 
field ( I believe this does a drop table / recreate table process ).

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
_
Make your home warm and cozy this winter with tips from MSN House  Home.  
http://special.msn.com/home/warmhome.armx

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: insert: auto increment field

2004-01-04 Thread Daniel Kasak
Mike Mapsnac wrote:

It solved the problem. But what truncate does? Just deletes the rows?
It's the same as doing:

drop table 
create table  ( schema from dropped table above )
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Importing dates from access

2004-01-04 Thread Daniel Kasak
Matthew Stuart wrote:

I have an access db with populated fields, some of them are date 
fields. One is a created date and another is a updated date. I haven't 
tried it yet, so I am not sure what I will get but I assume that if I 
am asking MySQL to automatically update these fields rather than 
manually have to fill them in, I would lose the correct dates? Will 
MySQL replace the original dates with that of the current date? If so, 
how can I overcome this?

The Access db I have doesn't have any automatic formatting for the 
date fields at the moment, but I want to introduce it in the MySQL 
version.

Thanks

Mat


I don't think you can tell MySQL to set a default date value of the 
current date. There is the timestamp field, which will show you when the 
record was last altered, but I wouldn't use that. I would create 2 date 
fields and have Access set them to what you want. That works best for me 
anyway.

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: MYsql wont start

2004-01-04 Thread Larry Brown
If you are using a myisam type which is default that log message isn't a
problem.  By switching to run level 5 does it work again?  I switch between
run levels on a regular basis so it shouldn't be the runlevel itself.  Did
you add or remove any files from the rc3.d folder manually?

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 7:24 PM
To: 'Larry Brown'; [EMAIL PROTECTED]
Subject: RE: MYsql wont start


Hi,
Thanx for the prompt reply.
What I did is I told X not to start on boot, so I went into
/etc/inittab and told it to run at run level 3...thats when mysql
stopped all together.  When I put it back to 5, mysql was running again,
but in the boot up sequence it says it timed out while starting...heres
the output from the command you mentioned:

[EMAIL PROTECTED] root]# service mysqld restart
Stopping MySQL:[  OK  ]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:[FAILED]
[EMAIL PROTECTED] root]#


Heres a quote from the log:


040104 16:11:05  mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
/usr/libexec/mysqld: ready for connections
040104 16:12:06  /usr/libexec/mysqld: Normal shutdown

040104 16:12:06  /usr/libexec/mysqld: Shutdown Complete

040104 16:12:06  mysqld ended

040104 16:16:04  mysqld started


I have done just what the log says and it still fails.

Don


-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 6:06 PM
To: Don Matlock; MySQL List
Subject: RE: MYsql wont start



The error is just telling you the server isn't there.  Is this RH?
If it is run..

#service mysqld restart

and see what messages you get if any and also check /var/log/mysqld.log
and
see what messages it is giving.  If it shows it started correctly,
connect
from the command line before doing anything with phpBB and make sure you
can
get around.  Otherwise you won't be able to tell if the problem is from
phpBB or from mysqld.

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 7:01 PM
To: [EMAIL PROTECTED]
Subject: MYsql wont start


Hi all,
I was able to get mysql up and running and installed phpBB to boot.
Upons reboot I noticed that the mysql daemon was timing out...when I log
into it this is the error I get:

[EMAIL PROTECTED] root]# mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
[EMAIL PROTECTED] root]#

(p.s. x's are me hiding my ip address)

Any thoughts?

Don



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]










-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: MYsql wont start

2004-01-04 Thread Don Matlock

Your right, when I switch back to run level 5 it works...still spews out
an error..but it works and all I did was up2date before it all
started...there was a whole slew of updates that came in.
Don
-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 04, 2004 6:35 PM
To: Don Matlock; MySQL List
Subject: RE: MYsql wont start

If you are using a myisam type which is default that log message isn't a
problem.  By switching to run level 5 does it work again?  I switch
between
run levels on a regular basis so it shouldn't be the runlevel itself.
Did
you add or remove any files from the rc3.d folder manually?

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 7:24 PM
To: 'Larry Brown'; [EMAIL PROTECTED]
Subject: RE: MYsql wont start


Hi,
Thanx for the prompt reply.
What I did is I told X not to start on boot, so I went into
/etc/inittab and told it to run at run level 3...thats when mysql
stopped all together.  When I put it back to 5, mysql was running again,
but in the boot up sequence it says it timed out while starting...heres
the output from the command you mentioned:

[EMAIL PROTECTED] root]# service mysqld restart
Stopping MySQL:[  OK  ]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:[FAILED]
[EMAIL PROTECTED] root]#


Heres a quote from the log:


040104 16:11:05  mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
/usr/libexec/mysqld: ready for connections
040104 16:12:06  /usr/libexec/mysqld: Normal shutdown

040104 16:12:06  /usr/libexec/mysqld: Shutdown Complete

040104 16:12:06  mysqld ended

040104 16:16:04  mysqld started


I have done just what the log says and it still fails.

Don


-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 6:06 PM
To: Don Matlock; MySQL List
Subject: RE: MYsql wont start



The error is just telling you the server isn't there.  Is this RH?
If it is run..

#service mysqld restart

and see what messages you get if any and also check /var/log/mysqld.log
and
see what messages it is giving.  If it shows it started correctly,
connect
from the command line before doing anything with phpBB and make sure you
can
get around.  Otherwise you won't be able to tell if the problem is from
phpBB or from mysqld.

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 7:01 PM
To: [EMAIL PROTECTED]
Subject: MYsql wont start


Hi all,
I was able to get mysql up and running and installed phpBB to boot.
Upons reboot I noticed that the mysql daemon was timing out...when I log
into it this is the error I get:

[EMAIL PROTECTED] root]# mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
[EMAIL PROTECTED] root]#

(p.s. x's are me hiding my ip address)

Any thoughts?

Don



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]












-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: insert: auto increment field

2004-01-04 Thread Mike Mapsnac
Thanks.

Just for curiosity. Why truncate was necessary in my case? I just create a 
table and try to insert some values.



From: Daniel Kasak [EMAIL PROTECTED]
To: Mike Mapsnac [EMAIL PROTECTED], [EMAIL PROTECTED],  
  [EMAIL PROTECTED]
Subject: Re: insert: auto increment field
Date: Mon, 05 Jan 2004 11:34:35 +1100

Mike Mapsnac wrote:

It solved the problem. But what truncate does? Just deletes the rows?
It's the same as doing:

drop table 
create table  ( schema from dropped table above )
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
_
Get reliable dial-up Internet access now with our limited-time introductory 
offer.  http://join.msn.com/?page=dept/dialup

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Importing dates from access

2004-01-04 Thread robert_rowe

If your MySQL field is date or datetime then MySQL will store whatever date your put 
in the field. If you use a timestamp field then MySQL will set this field to the 
current datetime on an insert or update unless you specifically set it to something. 

See this section of the manual for more information.

http://www.mysql.com/doc/en/DATETIME.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Oracle nvl function equivalent.

2004-01-04 Thread robert_rowe

What does nvl do? Here is a list of the functions from the MySQL manual:

http://www.mysql.com/doc/en/Function_Index.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: insert: auto increment field

2004-01-04 Thread Daniel Kasak
Mike Mapsnac wrote:

Thanks.

Just for curiosity. Why truncate was necessary in my case? I just 
create a table and try to insert some values.
Truncate is necessary because MySQL keeps track of autoincrement values 
for each table. Simply deleting a record ( or all records ) has no 
effect on the value of the next autoincrement field for a table.

If a have a table with 100 records, and I delete records number 72, for 
whatever reason, I don't want MySQL to use 72 as the next auto-increment 
value; I want it to use 101. If I was given 72, it could create all 
sorts of problems if there are references to records #72 in other 
tables. Which record would they refer to? The initial one, or the 
current one, of maybe another one that was deleted some time ago? It 
only makes sense to keep the autoincrement field constantly 
incrementing. If you delete a record, that auto-increment value should 
never come back.

So deleting all records will NOT reset the autoincrement value. Dropping 
the table will. I think there MAY be a command you can give MySQL to 
force it to start the auto-increment values at a particular point, but 
I've never been interested in doing that, so I don't know what it is.

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Table: NULL (yes or no)

2004-01-04 Thread Mike Mapsnac
I create two tables. And when  I do
desc table_name;
NULL value can be 'Yes' or 'No'. What the difference when NULL value is 
'Yes' or 'No

Thanks

_
Worried about inbox overload? Get MSN Extra Storage now!  
http://join.msn.com/?PAGE=features/es

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Oracle nvl function equivalent.

2004-01-04 Thread Ed Leafe
On Jan 4, 2004, at 7:09 PM, Arun Natarajan wrote:

Is there an equivalent to the nvl() function of Oracle available in 
MySql. I
am currently using version 4.1 alpha and am trying to execute the 
following
query:
Select count(nvl(col1,1)) as col1 from table1 group by col1;
	In MySQL, the function is called IFNULL().

 ___/
/
   __/
  /
 /
 Ed Leafe
Linux Love:
unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Table: NULL (yes or no)

2004-01-04 Thread Mike

I create two tables. And when I do
desc table_name;

NULL value can be 'Yes' or 'No'. What the difference when NULL value is 'Yes' or 'No

Not sure what you are asking, but if you have an ENUM column that can be Yes or No and 
you do not set the column to NOT NULL then there are three possible values: Yes, No, 
and NULL.

NULL simply means no value. Sometimes it is appropriate, sometimes it is not. In the 
case of a Yes/No ENUM column I would say that in most cases the column should be set 
NOT NULL.

Regards,
Mike Hillyer
www.vbmysql.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



myISAM to innodb

2004-01-04 Thread vinay
hi,
i have been using mysql-3.23.49a and now i want innodb support for the same 
version of the database, can any one tell how should i proceed.
regards
 

-- 
Vinay Kumar
Software Engineer
Prologix Software Solutions Pvt. Ltd.
Lucknow-226016.India
Ph: +91(522)2721387. Res: 2702453.
Fax: +91(522)2722286
E-Mail: [EMAIL PROTECTED]
Web: www.prologixsoft.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Perl DBD::mysql failed :(

2004-01-04 Thread Michael Stassen
Aleksei Wolff wrote:

I am on suse 9.0.

using cpan perl module (perl -MCPAN -e shell)
and install DBD::mysql
obtained the following error:

An error occurred while linking the DBD::mysql
driver.  The error message seems to indicate that you
dont have a libz.a or a libza.so
Can anybody suggest a possible fix?

Thanks in advance folks!!


Aleksei Wolff further wrote:
I am trying to install the DBI driver for mysql..i got an error which
 the INSTALL.html file says can be fixed by:
If this is the case for you, install an RPM archive like libz-devel,
 libgz-devel, zlib-devel or gzlib-devel or something similar.
Can anybody clue me in on what the above pakages (libz-devel, 
libgz-devel, zlib-devel, gzlib-devel) do? how do I install? I am on
suse 9.0

Thanks.
It's asking for the libz compression library.  If you don't already have 
it, see http://www.gzip.org/zlib/.

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]