[MySQLFAQ] series-several common cases of failure to start MySQL

Source: Internet
Author: User
Yesterday, I saw a new student in the Group still asking questions about MySQL startup failure. So I summarized several common cases, so I had the right to popularize the post and the old bird flew over. Problem 1: The Directory and file permission settings are incorrect. The $ datadir directory of MySQL and its subordinate directories and File Permission attributes are incorrectly set. As a result, MySQL cannot read and write files normally and cannot start. Error Message

Yesterday, I saw a new student in the Group still asking questions about MySQL startup failure. So I summarized several common cases, so I had the right to popularize the post and the old bird flew over. Problem 1: The Directory and file permission settings are incorrect. The $ datadir directory of MySQL and its subordinate directories and File Permission attributes are incorrectly set. As a result, MySQL cannot read and write files normally and cannot start. Error Message

Yesterday, I saw a new student in the Group still asking questions about MySQL startup failure. So I summarized several common cases, so I had the right to popularize the post and the old bird flew over.

Problem 1: Incorrect directory and file permission settings

The $ datadir directory of MySQL and its subordinate directories and File Permission attributes are incorrectly set. As a result, MySQL cannot read and write files normally and cannot start.
The error message is as follows:

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
Question 2: port conflict

If another mysqld instance is started and occupies the same port, You need to modify the port option.
The error message is as follows:

[ERROR] Can't start server: Bind on TCP/IP port: Address already in use[ERROR] Do you already have another mysqld server running on port: 3306 ?[ERROR] Aborting
Problem 3: the innodb configuration is incorrect.

The datafile and log file Settings in innodb are incorrect, causing startup failure. Especially when the default parameter is used for the first time, and then the innodb parameter is modified by referring to some optimization guidelines, the different size will be displayed, for example:

InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytesInnoDB: than specified in the .cnf file 0 134217728 bytes![ERROR] Plugin ‘InnoDB’ init function returned error.[ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
Problem 4: The mysql system library is not initialized.

After MySQL is installed, you must run mysql_install_db to initialize the mysql system library.

This time, we will list the above several common problems and add them again.
In general, when the mysqld process cannot be started, check the Error Log First regardless of any errors. Locate the cause based on the error log prompt. Do not simply look at the surface prompt, for example, mysql cannot be found. sock files.

Technical problems :?

MySQL FAQ

Original article address: [MySQL FAQ] series-several common cases of failure to start MySQL. Thank you for sharing with me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.