2

I've downloaded mysql 5.25 on mac os x Lion (10.7.4). I just tried setting my password in the usual way, however I'm getting an access denied error which is odd:

[user@Macintosh:~] #mysqladmin -uroot password 'secret'

mysqladmin: connect to server at 'localhost' failed

Is there something I'm missing about setting the root password for this version of mysql on this version of the mac? The database is definitely running according to what I see in the control panel / ps -ef.

1
  • My apologies for pinging you to another site, but there is nothing special about MySQL on Macs. It's not installed as part of Lion, so this really is about running a piece of open source software and coincidentally about Macs. To increase your chances of getting help - let's link to the exact download and see if they have a troubleshooting article you can let us know which step has you stumped. Listing the steps you've taken to solve the issue will help someone with experience point out your error in setting this package up for secure operation.
    – bmike
    Jun 3, 2012 at 17:36

1 Answer 1

3

Are you getting an access denied error or something else? mysqladmin should be printing a second line with more details, too. Have you looked over the installation notes for 5.5.25 (the current GA) at http://dev.mysql.com/doc/refman/5.5/en/osx-installation-notes.html ?

Sometimes the client don't look for the mysql socket file in the same place as it was written, or something deletes it if it's written in /tmp or another similar location. If so then connecting over TCP might work (add -h 127.1 to the command line options).

If you need to reset the password, you can stop mysql and start it (temporarily) with an option to just allow any access without authentication. I find the easiest way to get the current options it's running with is ps axwwwwwww | grep mysql.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.