启动mysql出现问题
/etc/init.d/mysqld start
MySQL server PID file could not be found![FAILED]
Starting MySQL......................................The server quit without updating PID file (/data/mysql/mysql_3306/data/mysql.pid).[FAILED]
查看错误日志
150619 15:57:19 [Note] Server socket created on IP: '0.0.0.0'.
150619 15:57:19 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
原因:
./scripts/mysql_install_db --user=mysql --defaults-file=/etc/my.cnf
该步骤(初始化数据库)中my.cnf用的是默认的
而启动时用的是最新的
解决方法:
用最新的配置文件进行初始化
cd /usr/local/mysql/
./scripts/mysql_install_db --user=mysql --defaults-file=/etc/my.cnf
启动没有问题