Can not start mysql .. ERROR 2002 (HY000): Can not connect to local MySQL server through socket '/tmp/mysql.sock (2)
I use mysql51. I've tried reinstalling but nothing works ...
ps ax
After installing MySQL for the first time run:
mysql_install_db --user=mysql
and
mysqld_safe &
and setup your root password with:
/usr/local/bin/mysqladmin -u root password 'your_passwd'
As Marc B has pointed out in the comments, mysql is not running.
mysql
In console (as root/admin), type;
/usr/local/etc/rc.d/mysql-server start
This should start the service, and you should be good to go.
Try following command line:
sudo chown -R _mysql:mysql /usr/local/var/mysql sudo mysql.server start
ps ax
, do you see the mysqld process? – fvu