MySQL cannot be started.

Source: Internet
Author: User

MySQL cannot be started.

Solution to MySQL failure

MySQL cannot be started

After mysql is stopped, perform some operations (such as modifying the host name) and restart mysql.

[Root @ www ~] $ Service mysql start Starting MySQL .. ^ [[.................................... ........................................ ...................... ERROR! The server quit without updating PID file (/disk/mysql/www. pid). [root @ www ~] $ Service mysql stop ERROR! MySQL server PID file cocould not be found! [Root @ www ~] $ Service mysql stop ERROR! MySQL server PID file cocould not be found! [Root @ www ~] $ Service mysql start Starting MySQL. [Root @ www ~] $

It cannot be started. Check the log:/disk/mysql/www. err.

120608 09:56:17 mysqld_safe Starting mysqld daemon with databases from /disk/mysql120608 9:56:17 [Note] Plugin 'FEDERATED' is disabled.120608 9:56:17 InnoDB: The InnoDB memory heap is disabled120608 9:56:17 InnoDB: Mutexes and rw_locks use InnoDB's own implementation120608 9:56:17 InnoDB: Compressed tables use zlib 1.2.3120608 9:56:17 InnoDB: Using Linux native AIO120608 9:56:17 InnoDB: Initializing buffer pool, size = 128.0M120608 9:56:17 InnoDB: Completed initialization of buffer poolInnoDB: Unable to lock ./ibdata1, error: 11InnoDB: Check that you do not already have another mysqld processInnoDB: using the same InnoDB data or log files.120608 9:56:17 InnoDB: Retrying to lock the first data fileInnoDB: Unable to lock ./ibdata1, error: 11InnoDB: Check that you do not already have another mysqld processInnoDB: using the same InnoDB data or log files.InnoDB: Unable to lock ./ibdata1, error: 11InnoDB: Check that you do not already have another mysqld processInnoDB: using the same InnoDB data or log files.InnoDB: Unable to lock ./ibdata1, error: 11...

It seems that the original mysqld has not stopped.

Force terminate mysqld

[root@www ~]$ ps -ef|grep mysql root   4769   1 0 Jun06 ?    00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/disk/mysql --pid-file=/disk/mysql/localhost.pidmysql   4874 4769 0 Jun06 ?    00:04:04 /usr/sbin/mysqld --basedir=/usr --datadir=/disk/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/disk/mysql/localhost.err --pid-file=/disk/mysql/localhost.pid --socket=/disk/mysql/mysql.sockroot   17947   1 0 09:56 pts/1  00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/disk/mysql --pid-file=/disk/mysql/www.pidmysql  18052 17947 0 09:56 pts/1  00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/disk/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/disk/mysql/www.err --pid-file=/disk/mysql/www.pid --socket=/disk/mysql/mysql.sockroot   18099 17514 0 09:56 pts/1  00:00:00 grep mysql[root@www ~]$ killall mysqld [root@www ~]$ killall mysqld [root@www ~]$ ps -ef|grep mysql root   18116 17514 0 09:57 pts/1  00:00:00 grep mysql[root@www ~]$

Start mysqld. It is no problem to execute multiple startup commands.

[root@www ~]$ service mysql start Starting MySQL. SUCCESS! [root@www ~]$ [root@www ~]$ [root@www ~]$ [root@www ~]$ [root@www ~]$ service mysql start Starting MySQL SUCCESS! [root@www ~]$ 

What is error: 11 displayed in the www. err file? Let's take a look:

[root@www ~]$ perror 11 OS error code 11: Resource temporarily unavailable[root@www ~]$ [root@www ~]$

If you have any questions, please leave a message or go to the community on this site for discussion. Thank you for reading this article. Thank you for your support!

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.