Mysql startup failure common errors, mysql failure Common Errors

Source: Internet
Author: User

Mysql startup failure common errors, mysql failure Common Errors

You can take an error one by one in sequence.

Mysql startup ERROR: Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql-master/data/mysql. pid) solution:

1. It may be that the/opt/mysql-master/data DIRECTORY mysql user does not have the permission to modify the data directory)

Solution: grant permissions, execute "chown-R mysql. mysql/opt/mysql-master/data", and restart mysqld.

 

2. the mysql process may already exist in the process.

Solution: Run "ps-ef | grep mysqld" to check whether the mysqld process exists. If the "kill-9 process number" is used to kill the process and restart mysqld!

 

3. mysql may be installed on the machine for the second time. The Service Startup may be affected due to residual data.

Solution: Go to the mysql binary log directory to see if there is a mysql-binlog.index, just remove it

 

4. mysql uses the/etc/my. cnf configuration file when the configuration file is not specified at startup. Open this file to see if there is a specified data directory (datadir) under [mysqld ).

Solution: Set this line in [mysqld]: datadir =/opt/mysql-master/data

 

5. skip-federated Field Problems

Solution: Check whether the skip-federated field has been commented out in the/etc/my. cnf file. If so, comment out the field immediately.

 

6. The error log directory does not exist.

Solution: use the "chown" "chmod" command to grant the mysql owner and permissions.

 

7. selinux. If it is a centos system, selinux is enabled by default.

Solution: temporarily change to warning mode: [root @ www php] # setenforce 0

Enable/etc/sysconfig/selinux and change SELINUX = enforcing to SELINUX = disabled.

8. You can try to enable the default mysql. cnf file to check whether the configuration file is incorrect.

Common configuration errors include:

Check whether innodb_buffer_pool_size is specified in the/etc/my. cnf configuration file.

Innodb_buffer_pool_size: Mainly used to cache indexes, data, and buffer when inserting data in the innodb table;

Default Value: 128 M;

Set the size of this value for a dedicated mysql Server: 70%-80% of the system memory.

If your system memory is not large, check this parameter and set it to a smaller value.

Tip: Remember to enable the mysql error log for troubleshooting.

Vim/etc/my. cnf can be edited based on your my. cnf file.

[Mysql_safe]

Log-error =/data/mysql-master/logs/error. log

 

Related Article

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.