I have recently installed Snow Leopard onto my Mac, and MySQL stopped working. I went into the terminal and used 'rm -r' on my old directory, and redownloaded the new version from the mysql website. I followed all of the instructions on HiveLogic, but am getting the error listed in the title.
When I run 'locate mysql.sock', I don't get any results. 'locate .sock' returns results that down seem like they relate to the problem. My understanding is that I need to restart mysqld, but the instructions that I have found on other questions don't seem to do that for me. How do I restart mysqld?
Best Answer
You can kill the mysql process manually.
Note the process id. Then,
Next thing you should do is edit your
my.cnf
file, and check to make sure that the socket location is/tmp/mysql.sock
. For example, this is what my[client]
section looks like:Let's say
$MYSQL
is your MySQL folder (in the case of the tutorial you provided, it's probably in/usr/local/mysql/bin
). If you haven't already done so, you have to set up your databases and give your superuser a password.Start MySQL here. Then:
Then run
sudo ./mysqld_safe --user=mysql &
and you should be set.