简体   繁体   中英

mysql won't start OSX — Can't connect through socket

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM