2012-05-06 17 views
0

すべてAWSインスタンスでMysqlの起動に失敗しました

aws.ec2.instanceでmysqldを起動できません。

なぜわからないのですか?

$ sudo yum install -y mysql mysql-server 
$ sudo mysql_install_db 
$ sudo service mysqld start 
MySQL Daemon failed to start. 
Starting mysqld:           [FAILED] 

打撃が私のenvを表示するためのいくつかのファイル..です

[mysqld] 
# Settings user and group are ignored when systemd is used. 
# If you need to run mysqld under different user or group, 
# customize your systemd unit file for mysqld according to the 
# instructions in http://fedoraproject.org/wiki/Systemd 
datadir=/var/lib/mysql 
socket=/var/lib/mysql/mysql.sock 
# Disabling symbolic-links is recommended to prevent assorted security risks 
symbolic-links=0 

[mysqld_safe] 
log-error=/var/log/mysqld.log 
pid-file=/var/run/mysqld/mysqld.pid 

私のログ(/var/log/mysql.log)

120506 10:53:44 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 
120506 10:53:44 [Note] Plugin 'FEDERATED' is disabled. 
/usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13) 
120506 10:53:44 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 
120506 10:53:44 InnoDB: The InnoDB memory heap is disabled 
120506 10:53:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
120506 10:53:44 InnoDB: Compressed tables use zlib 1.2.3 
120506 10:53:44 InnoDB: Using Linux native AIO 
120506 10:53:44 InnoDB: Initializing buffer pool, size = 128.0M 
120506 10:53:44 InnoDB: Completed initialization of buffer pool 
120506 10:53:44 InnoDB: highest supported file format is Barracuda. 
InnoDB: Log scan progressed past the checkpoint lsn 48941 
120506 10:53:44 InnoDB: Database was not shut down normally! 
InnoDB: Starting crash recovery. 
InnoDB: Reading tablespace information from the .ibd files... 
InnoDB: Restoring possible half-written data pages from the doublewrite 
InnoDB: buffer... 
InnoDB: Doing recovery: scanned up to log sequence number 1595675 
120506 10:53:44 InnoDB: Starting an apply batch of log records to the database... 
InnoDB: Progress in percents: 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed 
120506 10:53:44 InnoDB: Waiting for the background threads to start 
120506 10:53:45 InnoDB: 1.1.8 started; log sequence number 1595675 
120506 10:53:45 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 
120506 10:53:45 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13) 
120506 10:53:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 
な/etc/my.cnf

その他の情報が必要な場合は、

+1

ちょうどServerFaultに属しています。あなたのMySQLデータフォルダはゴミ箱になっています.MySQLテーブルは存在しません。パージして最初から再設定する必要があります。 –

答えて

1

ファイルhost.frmを見つけて、グループとそれが属するユーザーを確認してください。 "エラー番号:13" の意味:

~$ perror 13 
OS error code 13: Permission denied 

ので、それはおそらくです。 あなたが(それは、MySQLでのテーブルである)、そのファイルがない場合は、それらを再生成する必要があります。

~$ mysql_install_db 

乾杯、

mazzi。

0

私はこの問題を複数のAWSサーバーで何度も見たことがありますが、私の場合、根本的な原因はスペースの不足です。

したがって、サーバ上のスペースを解放してmysqldを再起動すれば正常に動作するはずです。

関連する問題