Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)谁能讲解一下...多谢...

解决方案 »

  1.   

    不能通过'/tmp/mysql.sock'连到服务器
      

  2.   

    方法:    修改/etc/my.conf:
    [mysqld]
    datadir=/usr/local/mysql/data
    socket=/var/lib/mysql/mysql.sock[mysql.server]
    user=mysql
    basedir=/usr/local/mysqlIf there is not currently a section called [client], add one at the bottom of the file and copy the socket= line under the [mysqld] section such as:[client]
    socket=/var/lib/mysql/mysql.sock
      

  3.   

    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    user=mysql
    # Default to using old password format for compatibility with mysql 3.x
    # clients (those using the mysqlclient10 compatibility package).
    old_passwords=1[mysqld_safe]
    log-error=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid我的是这样的..改了还是不行了...(WWWWb)
      

  4.   

    运行一下...mysqld_safe..就可以了..呵呵..