[[email protected] mysql]# service mysql restart Starting MySQL...[ERROR] The server quit without updating PID file (/usr/local/mysql/data/mysqld.pid).
See this do not panic, the configuration has just changed the comments out, to see if the configuration is wrong! Most of them are hand mistakenly caused.
If not, try the method again:
1. may be/usr/local/mysql/data/mysqld.pid file does not have permission to write
解决方法 : 给予权限,执行 “chown -R mysql:mysql /usr/local/MySQL/data/” “chmod -R 755 /usr/local/mysql/data” 然后重新启动mysqld!
2. The MySQL process may already exist in the process
Workaround:
用命令“ps -ef|grep mysqld”查看是否有mysqld进程, 如果有使用“kill -9 进程号”杀死,然后重新启动mysqld!
3. It may be the second time that MySQL is installed on the machine, with residual data affecting the start of the service.
Workaround:
去mysql的数据目录/data看看,如果存在mysql-bin.index,就赶快把它删除掉吧,它就是罪魁祸首了。
4.mysql The/ETC/MY.CNF profile is used when the configuration file is not specified at startup, please open this file to see if there is a specified data directory (DATADIR) under the [Mysqld] section.
Workaround:
请在[mysqld]下设置这一行:datadir = /usr/local/mysql/data
5.skip-federated Field Issues
Workaround:
检查一下/etc/my.cnf文件中有没有没被注释掉的skip-federated字段,如果有就立即注释掉吧。
6. Error log directory does not exist
Workaround:
使用“chown” “chmod”命令赋予mysql所有者及权限
7.selinux, if it is a CentOS system, the default is to turn on SELinux
Workaround:
关闭它,打开/etc/selinux/config,把SELINUX=enforcing改为SELINUX=disabled后存盘退出重启机器试试。
MySQL Startup report: [ERROR] The server quit without updating