0
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

That's what I get when I run $mysql (or sudo !! right after...) I have the preferences pane installed and have in the past had no problem starting and stopping it. I got this error and upon checking the preferences pane, it was not running. Hitting "start server" caused it to prompt me for my password, and then hang for a couple seconds, but not starting the server.

mysqld: Can't change dir to '/usr/local/mysql-5.1.51-osx10.6-x86_64/data/' (Errcode: 13)

120627 16:11:22 [ERROR] Aborting

is what I get when I run $mysqld from the command line. I've looked at half a dozen other posts on this topic, but none has really seemed to apply (so far) since I did nothing to my machine's configurations today, and mysql was running fine this morning.

Are there logs I could check? Are there my.conf settings I should investigate? If I sacrifice a lamb while installing cx_Oracle, will the database gods be appeased?

Ben
  • 4,980
  • 3
  • 43
  • 84

1 Answers1

-1

Uninstall your current mysql version and then use Homebrew to install mysql.

brew install mysql

I found this answer very helpful: https://stackoverflow.com/a/6378429/554406

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
jchook
  • 6,690
  • 5
  • 38
  • 40
  • 1
    before I do that, how's about let's address why on god's green earth such a thing would happen. Also, I installed it from the source I did because I am working at a company using that version, so switching to some other version is not a useful solution here. – Ben Jun 27 '12 at 21:43