Yesterday in the group to see a new classmate still ask MySQL can not start the problem, so summed up a few common situation, right when the popular post, the birds consciously flew over.
Issue 1: Directory and file permissions are not set correctly
MySQL $datadir directory, and its subordinate directory, file permissions property is set incorrectly, resulting in MySQL unable to read and write files, unable to start.
Error messages such as:
Mysqld_safe starting mysqld daemon with databases From/usr/local/mysql/data/usr/local/mysql/bin/mysqld_safe:line 107: /usr/local/mysql/data/imysql.local.err:permission denied
Issue 2: Port conflicts
Other mysqld instances have been started and the same port is occupied, and the port option needs to be modified.
Error messages such as:
[ERROR] Can ' t start server:bind on TCP/IP port:address already in Use[error] does you already has another MYSQLD server running O N port:3306? [ERROR] Aborting
Problem 3:INNODB Not configured correctly
InnoDB in the datafile, log file is not set correctly, resulting in a failure to start. In particular, the first time with the default parameters started, and later refer to some optimization guidelines, modified INNODB parameters, will prompt different size, detailed errors such as:
InnoDB:Error:log file./ib_logfile0 is of different size 0 5242880 Bytesinnodb:than specified in the. cnf file 0 134217 728 bytes! [ERROR] Plugin ' InnoDB ' init function returned error. [ERROR] Plugin ' InnoDB ' registration as a STORAGE ENGINE failed.
Issue 4: MySQL system library is not initialized
After MySQL is installed, you need to run mysql_install_db to initialize the MySQL system library in order to start normally.
This time first listed the above several common problems, next time to add.
Normally, when the MYSQLD process fails to start, regardless of any errors, the error log is prioritized (log files are generally in the $datadir/xx.err file, or/var/log/message,/var/log/mysql/ Mysqld.log and so on), according to the error log prompt to find the cause of the problem, do not just look at the surface hints, such as the Mysql.sock file cannot be found.
--------------------------------------Split Line--------------------------------------
http://zhishuedu.comTraining is a professional quality training brand jointly launched by senior MySQL expert Ye Jinlong and Wu Bingxi, with MySQL dba combat optimization and Python devops Development course, which is the most conscientious and The most quality training courses.
This article is from the "Lao Ye teahouse" blog, please be sure to keep this source http://imysql.blog.51cto.com/1540006/1879761
FAQ Series | Several common MySQL failed to start cases