Mysql Startup failure Common error

Source: Internet
Author: User

You can make a mistake in order.

MySQL startup times wrong: starting MySQL ... error! The server quit without updating PID file (/opt/mysql-master/data/mysql.pid) Workaround:

1, may be/opt/mysql-master/data/data directory MySQL user does not have permissions (modify the data directory permissions)

Workaround: Give permission, execute "chown-r mysql.mysql/opt/mysql-master/data" and restart Mysqld

2. The MySQL process may already exist in the process

WORKAROUND: Use the command "Ps-ef|grep mysqld" to see if there is a mysqld process, kill with "kill-9 process number" and then restart mysqld!

3, may be the second time to install MySQL on the machine, there are residual data affect the start of the service.

Workaround: Go to the MySQL binary log directory to see if there is a mysql-binlog.index, and quickly delete it.

4. mysql will use the/ETC/MY.CNF configuration file when it is not specified at startup, please open this file to see if there is a specified data directory (DATADIR) under [mysqld].

WORKAROUND: Please set this line under [mysqld]: DataDir =/opt/mysql-master/data

5. skip-federated field Problem

Workaround: Check the/etc/my.cnf file for any skip-federated fields that have not been commented out, and if so, comment them out immediately.

6. Error log directory does not exist

Workaround: Use "Chown" "chmod" command to give MySQL owner and permissions

7, the disaster of SELinux, if it is a CentOS system, default will open SELinux

Workaround: Temporarily change to warning mode first: [[email protected] php]# Setenforce 0

Then open the/etc/sysconfig/selinux and change the selinux=enforcing to selinux=disabled

8, you can try to mysql.cnf default file open, troubleshooting is not a configuration file errors.

Common configuration errors are:

Check the configuration file/etc/my.cnf There is no innodb_buffer_pool_size this parameter

Innodb_buffer_pool_size: The main role is to cache the index of the InnoDB table, data, buffer when inserting data;

Default value: 128M;

Dedicated MySQL server sets the size of this value: System memory is 70%-80% best.

If your system has little memory, look at this parameter and set it to a smaller value.

Warm tip: Remember to turn on MySQL error log, convenient for your own troubleshooting.

VIM/ETC/MY.CNF You can edit according to your own my.cnf file.

[Mysql_safe]

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

Mysql Startup failure Common error

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.