首页 > 代码库 > Mysql启动失败 MYSQL:The server quit without updating PID file

Mysql启动失败 MYSQL:The server quit without updating PID file

编译安装MySQL5.6启动时出错 提示MYSQL:The server quit without updating PID file

首先执行 /bin/mysqld_safe --user=mysql &

失败 错误日志提示 mysqld_safe mysqld from pid file ended

继续 初始化mysql /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data &(这点非常重要)

失败 错误日志提示  /usr/local/server/mysql/bin/mysqld: unknown variable ‘table_cache=2048‘

修改MySQL配置文件 my.cnf 找到table_cache = 2048 注释掉或者删掉

再次执行 /usr/local/server/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/server/mysql --datadir=/data/mysql/data &

初始化成功 启动MySQL服务

# /etc/init.d/mysqld start
Starting MySQL.. SUCCESS!

启动成功 解决。

 

Mysql启动失败 MYSQL:The server quit without updating PID file