Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
    
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 '12 at 17:36
add comment

migrated from apple.stackexchange.com Jun 4 '12 at 19:04

This question came from our site for power users of Apple hardware and software.

1 Answer

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/macosx-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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.