AWS实例上的Mysql启动失败

时间:2012-05-06 11:05:27

标签: mysql amazon-web-services

所有

我无法在aws.ec2.instance上启动mysqld,colude帮帮我?

我不知道为什么?

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

打击是一些显示我的环境的文件..

的/etc/my.cnf

[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

如果需要任何其他信息,请告诉我pleace

2 个答案:

答案 0 :(得分:1)

尝试查找文件host.frm并检查该组及其所属的用户。 “errno:13”表示:

~$ perror 13
OS error code  13:  Permission denied

所以可能就是这样。 如果您没有该文件(即mysql中的表),则必须使用以下命令重新生成它们:

~$ mysql_install_db

干杯,

mazzi。

答案 1 :(得分:0)

我在多个AWS服务器上多次看到此问题,在我的案例中,主要根本原因是空间不足。

所以,只需释放服务器上的一些空间并重新启动你的mysqld就应该开始正常工作了。