A new CentOS server installed, after installing lamp, restarted the system, found that MySQL can not boot and reported the following error:
/etc/init.d/mysqld start Starting MySQL ... error! The server quit without updating PID file (/var/lib/mysql/feixiag.pid). |
View the log as follows:
innodb:apply Batch completed 2015-03-18 17:28:05 24592 [ Note] innodb:128 rollback segment (s) is active. 2015-03-18 17:28:05 24592 [Note] innodb:waiting for purge to start 2015-03-18 17:28:05 24592 [Note] innodb:5.6.21 started; log sequence number 1600607 2015-03-18 17:28:05 24592 [Note] Server hostname (bind-address): ' * '; port:3306 2015-03-18 17:28:05 24592 [Note] IPv6 is available. 2015-03-18 17:28:05 24592 [note] -':: ' resolves to ':: '; 2015-03-18 17:28:05 24592 [Note] Server socket created on IP: ':: '. 2015-03-18 17:28:05 24592 [ERROR] Fatal Error:can ' t open and Lock Privilege tables:table ' mysql.user ' doesn ' t exist 150318 17:28:05 mysqld_safe mysqld from PID File/var/lib/mysql/feixiag.pid ended |
Google, Baidu, also did not find a good method, suddenly remembered, I initialized the database when the DataDir specified path to/data/mysql, and in/etc/my.cnf DataDir did not modify the specified path.
View/etc/my.cnf, as expected, was not changed, changed to Datadir=/data/mysql, started successfully.
Note: The contents of the my.conf in addition to the need, the other best is commented out.
MySQL Startup error problem