# mysql

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

# ln -s /usr/local/mysql/data/mysql.sock /tmp/mysql.sock



ERROR 1045 (28000):Access denied for user 'root'@'localhost' (using password: NO)

说明设置了mysql密码,需要# mysql -uroot -p'密码'

设置密码cd /usr/local/mysql/bin下 # ./mysqladmin -u root password '密码'