|
Error 2002: Can't Connect To Local MySQL Server Through Socket '/VAR/LIB/Mysql/mysql.sock' (2)
In fact, everyone asks all the questions all the questions, saying what link is not mysqld.sock. In fact, everyone may wish to see what Mysql's error log understand what is going on, I here's the wrong log is
/var/lib/mysql/*.err You will find mysql only, because / var / lib / mysql permissions do not allow mysql service access, English MySQL default is to call mysql users to start the service, ok, Since you know what is the reason you can't start, it is simple. We only need
Chown -r mysql: mysql / var / lib / mysql is in line, if it is still not started, slowly adjust the permissions, anyway, it is generally not the problem.
If everyone still can't start, then use my more cumbersome permissions, anyway, I do this every time, I will generally don't have a problem. See below:
Chown -r root / usr / local / mysql
chgrp -r mysql / usr / local / mysql
chown -r root / usr / local / mysql / bin
chgrp -r mysql / usr / local / mysql / bin
chgrp -r mySQL / var / lib / mysql
CHMOD 777 / VAR / LIB / MYSQL
Chown -r root / var / lib / mysql / mysql
Chgrp -r mysql / var / lib / mysql / mysql
CHMOD 777 / VAR / LIB / MYSQL / MySQL
Chown -r root / var / lib / mysql / mysql / *
chgrp -r mySQL / var / lib / mysql / mysql / *
CHMOD 777 / VAR / LIB / MYSQL / MySQL / *
Chmod 777 /usr/local/mysql/lib/mysql/libmysqlclient.a
After doing the above steps, then a script for your compilation directory COPY
CP Support-files / mysql.server /etc/rc.d/init.d/mysqld
Chkconfig --Add MySQLD
Use NTSYSV settings to make MySQL each startup automatically.
Ok, until this mysql is installed, you can start your MySQL service like this.
/etc/rc.d/init.d/mysqld start |
|