ホームページ  >  記事  >  データベース  >  MySQL はソリューション サンプルの共有を開始できません

MySQL はソリューション サンプルの共有を開始できません

黄舟
黄舟オリジナル
2017-09-11 11:12:131198ブラウズ

この記事では、MySQL が起動できない問題の解決策に関する関連情報を主に紹介します。この記事を通じて、データベースが起動できない問題を解決できることを願っています。 MySQL が起動できない問題

mysql を停止した後、いくつかの操作 (ホスト名の変更など) を実行し、mysql を再起動したところ、起動できないことがわかりました。


[root@www ~]$ service mysql start 
Starting MySQL..^[[A.................................................................................................. ERROR! The server quit without updating PID file (/disk/mysql/www.pid).
[root@www ~]$ service mysql stop 
 ERROR! MySQL server PID file could not be found!
[root@www ~]$ service mysql stop 
 ERROR! MySQL server PID file could not be found!
[root@www ~]$ service mysql start 
Starting MySQL..................
还是老样子,只好 Ctr+C 掉。
[root@www ~]$

本当に起動できません。ログを見てください: /disk/mysql/www.err


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

オリジナルの mysqld が停止していないようです。

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.pid
mysql   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.sock
root   17947   1 0 09:56 pts/1  00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/disk/mysql --pid-file=/disk/mysql/www.pid
mysql  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.sock
root   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 ~]$

これで複数の起動コマンドを実行しても問題なくなりました。


[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 ~]$

先ほどの www.err ファイルに示されているエラー 11 とは何ですか? 見てみましょう:


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

以上がMySQL はソリューション サンプルの共有を開始できませんの詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。