Updating MySQL from 4.0.21 to 5.0.15

I just saw that MySQL 5.0 came out, so I decided to update my system. I downloaded the .dmg file for the Mac OS X 10.4 standard edition (5.0.15) from here. I installed MySQL using the installer. Then I installed the startup item and added the preference pane. Then I was able to login to my host and to localhost without a password, because that is the initial state of MySQL. So far so good.

Then I tried to set the root password following the directions here.

Then I tried the following line in the command line

mysql -u root

This gives me the error...

ERROR 1045: Access denied for user 'root'@'localhost' (using password: NO)

If I type in

mysql -u root -p

And type in my password, I get the error...

ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Then I followed the directions here for resetting the root password.

When I follow the directions and create the text file "test" and run this command, here is what I get...

mysqld_safe --init-file=test &

[1] 756
touch: /Library/MySQL/var/myhost.err: Permission denied
cat: /Library/MySQL/var/myhost.pid: Permission denied
rm: /Library/MySQL/var/myhost.pid: Permission denied
Fatal error: Can't remove the pid file: /Library/MySQL/var/myhost.pid
/Library/MySQL/bin/mysqld_safe: line 275: /Library/MySQL/var/myhost.err: Permission denied
Please remove it manually and start /Library/MySQL/bin/mysqld_safe again
mysqld daemon not started

Please help anyone. I just want to get this new version of MySQL 5.0 up and running. Thank you.

Posted on Oct 24, 2005 7:35 PM

Reply
3 replies

Oct 27, 2005 12:54 PM in response to Jeff Breitner

I think the problem was that I have two installations of mysql on my hard drive. The 4.0.21 version is in /Library/MySQL/bin. The 5.0.15 version is in /usr/local/mysql/bin. Because my path was set to /Library/MySQL/bin, when I typed in "mysql -u root -p" it would look for the 4.0.21 version of mysql. So, from now on, I will try to use absolute paths, so that I am clear about what I am trying to do and what is not working...

When I install the 4.0.21 version and type "/Library/MySQL/bin/mysql -u root -p" everything works great. I can successfully connect to mysql either using the command line or by using CocoaMySQL.

When I install the 5.0.15 version over this and type

sudo /usr/local/mysql/bin/mysqld_safe

then hit control-Z, then type

bg

and then type

/usr/local/mysql/bin/mysql -u root -p

I am able to successfully connect to the 5.0.15 version through the commandline.

-----------------
A brief digression...
-----------------

But, if I then try to connect to the 4.0.21 version of mysql by typing...

/Library/MySQL/bin/mysql -u root -p

I get the error "ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client."

----------------
end of digression
----------------

The most serious thing is that once the 5.0.15 version is installed and can be accessed through the commandline, I am unable to connect to it using CocoaMySQL. Is there something I need to tell CocoaMySQL so that it knows which version to use, or which path to follow to mysql?

I would like to just have one installation (the 5.0.15 version) where I can access mysql either through the commandline or through CocoaMySQL.

Oct 27, 2005 9:44 PM in response to mahongue

Hi Mahongue--

But, if I then try to connect to the 4.0.21 version of mysql by typing...


/Library/MySQL/bin/mysql -u root -p


I get the error "ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client."


I suspect that what's really happening is the the old 4.0.21 client is trying to connect to the new 5.0.15 server. They changed the way passwords are handled between 4.0.x and 4.1.x, and you'll get the message about the client not supporting the authentication protocol.

The MySQL web site has a pretty good explanation of this issue in the documentation for 5.0.x. See if it helps.

As for, CocoaMySQL, unless that program gets updated, I think you're going to have to use the old passwords as explained on the MySQL site. The application will need to be re-compiled or re-linked...

I ran into this a long time ago and got around it, and I remember it was kind of tricky. I only vaguely recall it now, but I think the problem was that since I'd already made a new password, I couldn't connect to the server if I started it with the "old-passwords" option.

So, I think what I did was to start the server with the new passwords, log in, and change the passwords for my users to the old, shorter passwords, using the directions on the MySQL site. Then, once I had the old passwords stored, I restarted using the "old-passwords" option, and was able to connect. Unfortunately, my memory of this is a little hazy, and it's before I started writing this kind of stuff down...

HTH,

charlie

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Updating MySQL from 4.0.21 to 5.0.15

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.