web-dev-qa-db-ja.com

MySQLデーモンを起動しようとしてタイムアウトエラーが発生しました。 CentOS 5

CentOSでMySQLに問題が発生しました。いくつかの問題があり、データベースをバックアップし、すべての依存関係を持つmysqlを削除しました。その後、再インストールを実行しました:

 yum groupinstall "MySQL Database"

エラーなしでインストールされました。

Mysqlデーモンの実行:

service mysqld start

Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:                                            [FAILED]

私も走った

# /usr/bin/mysql_install_db --user=mysql
Installing MySQL system tables...
120112  1:49:44 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys'  had only 480 error messages,
but it should contain at least 481 error messages.
Check that the above file is the right version for this program!
120112  1:49:44 [ERROR] Aborting

Installation of system tables failed!

Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/libexec/mysqld --skip-grant &
and use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:

Shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!

ログの確認:

less /var/log/mysqld.log

ログファイルが空です。私はそれをデバッグする方法さえ知らないし、何をすべきかわからない。

推奨事項はありますか?

ありがとうございました

20
epema

ちょっとそれはあなたがディスクスペースを使い果たしたからです...だから大雑把なdf -h 念のため! (このちょうど私に起こった:P)。

28
h4unt3r

ずっと前にこれを聞いたのは知っていますが、"MySQL Daemonを起動しようとしてタイムアウトエラーが発生しました。"を検索する人はここにたどり着く可能性があるため、そのエラーにはいくつかの解決策があります。それらのいくつかを次に示します。

まず、service mysqld startまたはservice mysqld restartを実行する代わりに、次を実行してください。

$ service mysqld stop; mysqld_safe &

/etc/init.d/mysqldスクリプトのmysqladmin行には既知の問題があります。

これが機能しない場合は、次のことを試してください:(特に/varに)十分な空きディスク容量があるかどうかを確認します。

$ df -h

これらのファイルで考えられるエラーメッセージを確認します(すべてが存在するとは限りません)。

# tail -n 30 /var/log/messages

# tail -n 30 /var/log/mysqld.log

# tail -n 30 /var/lib/mysql/*.err

# tail -n 30 /var/log/mysql/error.log

次に、/etc/my.cnfが使用することを確認してください...

socket=/var/lib/mysql/mysql.sock

...そしてディレクトリ/var/lib/mysql/が実際に存在すること。

正しい許可と所有権を設定します。

# chown -R mysql.mysql /var/lib/mysql/

# chmod g+w /var/run/mysqld/

# chgrp mysql /var/run/mysqld/

まだ動かない? my.cnfのバインドアドレスを127.0.0.1または0.0.0.0に変更するか、その行をコメントアウトしてください。

それでもうまくいかない場合は、mysql_install_dbに関する詳細情報を検索してください。InnoDBデータベースが壊れている可能性があるため、set-variable=innodb_force_recovery=6も調べてください。

38
Norbert

Mysqlサーバーを起動する前に、ファイル名を変更します/var/lib/mysql/ib_logfile0および/var/lib/mysql/ib_logfile0その後、サーバーを再起動します

linux/unixで

mv /var/lib/mysql/ib_logfile0  /var/lib/mysql/ib_logfile0_old
mv /var/lib/mysql/ib_logfile1  /var/lib/mysql/ib_logfile1_old

それから

service mysqld restart
7
farhan

これを試して:

rm $(grep socket /etc/my.cnf | cut -d= -f2)  && service mysqld start
0
Ammad

私の場合、原因は、コメントアウトするときに/etc/my.cnfでkey_buffer_sizeを設定したことで、mysqldは問題なく起動しました。

0
16851556