The MySQL server suddenly fails to start, looking at the last boot log as follows:
080825 09:38:04 Mysqld started
080825 9:38:04 [ERROR] Can ' t start server:bind on Unix socket:permission denied
080825 9:38:04 [ERROR] Do you already has another MYSQLD server running on socket:/var/mysql.sock?
080825 9:38:04 [ERROR] Aborting
080825 9:38:04 [Note]/usr/local/mysql/bin/mysqld:shutdown complete
080825 09:38:04 Mysqld Ended
The f is configured as follows:
[Mysqld]
Datadir=/usr/local/mysql/data
Socket=/var/mysql.sock
[MySQL]
Socket=/tmp/mysql.sock
[Mysql.server]
User=mysql
Basedir=/usr/local/mysql
[Safe_mysqld]
Err-log=/usr/local/mysql/mysqld.log
Pid-file=/usr/local/mysql/mysqld.pid
According to the log file display, first check the operation permissions, and then look at/var/mysql.sock, found that the/var/mysql.sock directory does not have the file, is not the right to write the/var directory? OK, then use the root user to run the safe_mysqld, start normal. Use MySQL connection database, prompt error, connect not to the database server,/tmp directory without mysql.sock this file, to here, basically clear the MySQL client and server in the local communication mode, through a named Mysql.sock File to initialize the communication, so the directory in which the file is stored must have access to both parties, and the server needs to write the file at startup, if the two items in F are incorrectly configured, there will be similar errors such as permission denied. Modify the configuration file as follows, there is no problem.
[Mysqld]
Datadir=/usr/local/mysql/data
Socket=/tmp/mysql.sock
[MySQL]
Socket=/tmp/mysql.sock
[MySQL. Server]
User=mysql
Basedir=/usr/local/mysql
[Safe_mysqld]
Err-log=/usr/local/mysql/mysqld.log
pid-file=/usr/local/Mysql/mysqld.pid
If it doesn't work, then you need chmod 777/tmp
MySQL cannot start can ' t start server:bind on UNIX Socke