centos6.5 installation of MySQL "Mysqld is dead, but Subsys is locked" solution

Source: Internet
Author: User

Tag: "Mysqld is dead but Subsys is locked"

Today installed the CentOS 6.5 32-bit system, remote installation of MySQL, after entering MySQL, something forgot to quit, when I think of it, remote has been disconnected, reconnect ssh, login mysql, enter password hint error, check services: Service mysqld Status

[[Email protected] ~]# service mysqld Statusmysqld is dead, but Subsys is locked [[email protected] ~]#

Then query the following information, follow these steps:

[[Email protected] ~]# service mysqld stop Stop mysqld: [OK][[email protected] ~]#


[[email protected] ~]# ps aux|grep mysqlroot     13690   0.0  0.0   6764  1420 ?         s    04:10   0:00 /bin/sh /usr/bin/mysqld_safe - -user=root --skip-grant-tablesmysql    14708  0.0  0.7  135412 15024 ?        sl   04:26    0:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=root -- skip-grant-tables --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid -- socket=/var/lib/mysql/mysql.sockroot     15558  0.0  0.0    6736  1412 pts/1    S    04:49    0:00 /bin/sh /Usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var /run/mysqld/mysqld.pid --basedir=/usr --user=mysqlmysql    15660  0.0   0.6  80748 11840 pts/1    Sl   04:49    0:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql  --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/ mysql.sockroot     16107  0.0  0.0   5984    764 pts/1    s+   04:51   0:00 grep  mysql[[email protected]localhost ~]#


[[Email protected] ~]# [[email protected] ~]# kill-9 14708//kill MySQL process [[email protected] ~]#


[[Email protected] ~]# PS aux|grep mysql//mysql process is turned off root 16170 0.0 0.0 5980 756 PTS/1 s+ 04:53 0:00 grep mysql[[email protected] ~]# [[email protected] ~]# service mysqld Statusmysqld is dead, but Subsys is locked [[email protected] ~]#


[[Email protected] ~]# service mysqld restart//Restart MySQL service, reconnect stop mysqld: [OK] starting mysqld: [OK][[email protected] ~]#


[[Email protected] ~]# mysql -u root -p   enter password:  welcome to the mysql monitor.  commands end with ; or  \g.your mysql connection id is 2server version: 5.1.73 source  distributionCopyright  (c)  2000, 2013, oracle and/or its affiliates.  all rights reserved. oracle is a registered trademark of oracle corporation and/or  Itsaffiliates. other names may be trademarks of their respectiveowners . type  ' help; '  or  ' \h '  for help. Type  ' \c '  to clear the current input  statement.mysql>                                     //Connection successful, enter mysqlmysql> mysql> exitbye[[ email protected] ~]#


The following is an online reference:

MySQL was installed on Red Hat Linux 9 today, but after service MySQL start, the following prompt appears when you view the service MySQL status:

Mysqld is dead, but Subsys is locked.

I also read the log file at first, the log file prompt:

Cannot initialize InnoDB as ' Innodb_data_file_path ' is not set.
If you don't want to use transactional InnoDB tables, add a line
Skip-innodb
To the [mysqld] sections of init parameters in your MY.CNF
or My.ini. If you want-InnoDB tables, add to the [mysqld]
section, for example,
Innodb_data_file_path = Ibdata1:10m:autoextend
But to get good performance-should adjust for your hardware
The InnoDB startup options listed in sections 2 at
060806 12:51:01/usr/libexec/mysqld:incorrect information in file: './mysql/host.frm '
060806 12:51:01 Mysqld Ended

I send the original English to everyone to see:

1. Obviously the ' OLE check the log file for anything nasty

Cat/var/log/mysqld.log

2. Stop the Service

Service Mysqld Stop

3. Check to see if the service stopped, it might is calling the wrong PID.

PS aux | grep MySQL

4. Kill any MySQL process, that might still is running.

Kill-9??? ???

5. (*careful*) remove/move/backup any databases from the data directory, only does this step if you need to.

rm-rf/var/lib/mysql/*

6. Check Your global options configuration file, should is similar to STEVANBT ' s initial post.

Cat/etc/my.cnf

7. Copy over one of the preconfigured ' sample ' server-specific options file. Global (/etc/my.cnf) file has the priority over Server-specific file, but these had more options in them and had been tuned For a certain role.

Cp/usr/share/doc/mysql-server-?.??.?? /my-small.cnf/var/lib/mysql

8. Recreate the initial databases, this step is optional as the initscripts would do this anyway.

mysql_install_db

9. Check and set the runlevels for the service.

Chkconfig--level 345 mysqld on
Chkconfig--list mysqld

Start the service.

Service mysqld Start

Check the log file (step 1)

Thats just a basic step through check, most of which you have probably already do this.

In fact, the step 9 problem has been solved.

centos6.5 installation of MySQL "Mysqld is dead, but Subsys is locked" solution

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.