The MySQL Server suddenly cannot be started. Check the final startup log as follows: 08082509: 38: 04mysqldstarted0808259: 38: 04 [ERROR] Can
The MySQL Server suddenly cannot be started. Check the final startup log as follows: 080825 09:38:04 mysqld started080825 9:38:04 [ERROR] Can
The MySQL Server suddenly cannot be started. Check the final startup 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 have 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 configuration of my. cnf is 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
Check the running permission according to the log file, and then check/var/mysql. sock, found/var/mysql. the file does not exist in the sock directory. Is there no permission to write the/var directory? OK, run the safe_mysqld command as the root user and start it normally. When I use mysql to connect to the database, an error is prompted. The database server cannot be connected, and mysql is not found in the/tmp directory. here, the sock file shows the communication between the Mysql client and the server on the local machine. the sock file is used for initialization and communication. Therefore, the directory where the file is stored must be accessible by both parties, and the server needs to write the file when it is started. If my. if the two configurations in cnf are incorrect, similar errors such as Permission denied may occur. Modify the configuration file as follows.
[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 the problem persists, chmod 777/tmp is required.