MySQL failure--mysql cannot start the solution

Source: Internet
Author: User

Restart the server and restart app service (confluence)-Error, database connection failed (MySQL set boot-up)-View MySQL database status:

[Email protected] localhost~]# Ps-ef | grep MySQL

Root 25555 21974 0 11:28 pts/0 00:00:00 grep mysql

start the MySQL server

[[email protected] localhost data]# service MySQL start

MySQL server PID file could not being found! Failed

Starting MySQL ..... ..... error! The server quit without updating PID file (/mydata/data/fisheye. PID). Failed

To view the error log:

[email protected] localhost data]# tail-100 fisheye.err

Innodb:last MySQL binlog file position 0 337403929, file name./mysql-bin.000016

141013 1:13:28 innodb:waiting for the background threads to start

141013 1:13:29 innodb:5.5.33 started; Log sequence Number 1006647152

17:13:29 Utc-mysqld got signal 11;

This could is because a bug. It is also possible the this binary

Or one of the libraries it was linked against IS corrupt, improperly built,

Or misconfigured. This error can also is caused by malfunctioning hardware.

We'll try our best to scrape up some info, that'll hopefully help

di141013 01:13:29 mysqld_safe mysqld from PID File/mydata/data/fisheye.pid ended

no obvious error hints were found, so create a pid file manually try

[email protected] localhost data]# touch/mydata/data/fisheye.pi

Then restart the service:

[[email protected] localhost data]# service mysql restart

ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (2)

suddenly think of the previous read such an error article, remember that there may be insufficient disk space caused by MySQL can not start.

[email protected] localhost data]# df-h

file System capacity has been used with available% mount points

/DEV/SDA1 9.5G 9.5G 0 100%/

/DEV/SDA4 5.5G 1.3G 4.0G 24%/mnt/backup

/dev/mapper/ihuilianvg-ihuilianlv00

22G 4.2G 17G 20%/var/www/app

Tmpfs 1.3G 0 1.3G 0%/dev/shm

sure enough, here are some similar questions (Unable to start) solution ideas:

1. The DataDir directory may be full of partitions (DF-H)

Workaround: Open the configuration file/etc/my.cnf, reassign the Data directory (DATADIR) under the [Mysqld] section, and migrate the original data directory to the re-established data directory

About the migration: (1), CP or tar must be given permission to the band, but to prevent accidental proposal re-authorization once, (2), data relatively large must first compress and then migrate, to ensure integrity, especially SCP to other machines may time out so be sure to compress (tar.gz); (3), If you move to another server, make sure the MySQL version is consistent.

2. may be/mydata/data/fisheye.pid file does not have permission to write

Workaround: Give permission, execute "chown-r mysql:mysql/mydata/data/" and restart mysqld!

3. 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!

4. It may be the second time that MySQL is installed on the machine, with residual data affecting the start of the service.

Workaround: Go to MySQL data directory/data See, if there is mysql-bin.index, quickly delete it, it is the culprit.

5.skip-federated field problem (Error message: [ERROR]/mydata/data/mysql/libexec/mysqld:unknown option '--skip-federated ')

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.selinux, if it is a CentOS system, the default is to turn on SELinux

Workaround: Turn it off, open the/etc/selinux/config, change the selinux=enforcing to selinux=disabled, and then save the restart machine and try again.

MySQL failure--mysql cannot start the solution

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.