ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/loc
al/mysql.sock' (2)那位老大能帮我解决
有人说重起就好了,我重起了好几次也没好

解决方案 »

  1.   

    try:
    #chown -R mysql:mysql /var/lib/mysql[root@localhost beinan]# /etc/init.d/mysqld start
    启动 MySQL: [ 确定 ]
    [root@localhost lib]# mysqladmin -uroot password '123456'
    [root@localhost lib]# mysql -uroot -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 3 to server version: 4.1.11Type 'help;' or '\h' for help. Type '\c' to clear the buffer
      

  2.   

    klan 的方法可以启动mysql4
    mysql5的启动
    ===============
    [root@localhost ~]# mysqld_safe
    Starting mysqld daemon with databases from /var/lib/mysql===========
    然后新开一个命令行[root@localhost ~]# mysql -uroot -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1 to server version: 5.0.27Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>=======================
    关闭命令
    [root@localhost ~]# mysqladmin shutdown -uroot -p
    Enter password:
    [root@localhost ~]#
      

  3.   

    非常感谢!本人这两天也正为这个发愁呢!现在mysql已经正常了,但是我想打开mysql.sock这个文件一探究竟,打开后是空的,"mysql.sock" [Permission Denied],是什么原因呢?