2015-10-15 107 views
-1

请帮助我。MySQL守护程序无法启动。 ib_logfile的大小不同

服务器:AWS EC2

问题:

#sudo service mysqld start 

MySQL Daemon failed to start. 
Starting mysqld:           [FAILED] 

六/var/log/mysqld.log:

151015 05:46:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 
151015 5:46:26 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.45) starting as process 14873 ... 
151015 5:46:26 [Warning] option 'innodb-buffer-pool-size': signed value 1048576 adjusted to 5242880 
151015 5:46:26 [Note] Plugin 'FEDERATED' is d151015 05:46:26 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 
151015 05:46:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 
151015 5:46:42 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.45) starting as process 15133 ... 
151015 5:46:42 [Note] Plugin 'FEDERATED' is disabled. 
151015 5:46:42 InnoDB: The InnoDB memory heap is disabled 
151015 5:46:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
151015 5:46:42 InnoDB: Compressed tables use zlib 1.2.8 
151015 5:46:42 InnoDB: Using Linux native AIO 
151015 5:46:42 InnoDB: Initializing buffer pool, size = 128.0M 
151015 5:46:42 InnoDB: Completed initialization of buffer pool 
InnoDB: Error: log file ./ib_logfile0 is of different size 0 0 bytes 
InnoDB: than specified in the .cnf file 0 5242880 bytes! 
151015 5:46:42 [ERROR] Plugin 'InnoDB' init function returned error. 
151015 5:46:42 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 
151015 5:46:42 [ERROR] Unknown/unsupported storage engine: InnoDB 
151015 5:46:42 [ERROR] Aborting 

151015 5:46:42 [Note] /usr/libexec/mysql55/mysqld: Shutdown complete 

151015 05:46:42 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 

谢谢!

+0

看吧http://serverfault.com/questions/379714/unknown-unsupported-storage-engine-innodb-mysql -ubuntu – Jens

+0

@Jens这只是以前的错误的后果。这与这里的问题无关。 – fancyPants

回答

0

这是你的错误:

InnoDB: Error: log file ./ib_logfile0 is of different size 0 0 bytes InnoDB: than specified in the .cnf file 0 5242880 bytes!

无论你在my.cnf文件innodb-log-file-size值调整到你的日志文件的大小(512M我认为),或者你只是删除文件ib_logfile0ib_logfile1您MySQL文件夹(最有可能的是/var/lib/mysql),让MySQL自动重新创建它们。

0

大多数情况下,这是因为您的磁盘空间已满。检查空间运行..

df 

尝试检查某处的日志文件。或者运行以下找到大文件...

sudo find/-xdev -type f -size +100M 

一旦你清楚你的磁盘空间,请尝试重新启动MySQL的

sudo service mysqld restart 

如果还是错误,然后尝试移动iblog文件和然后重新启动mysql ...

sudo mv /var/lib/mysql/ib_logfile* ~/ 
sudo service mysqld restart 

这应该是在这个问题的案件的90%。我会避免太多与my.cnf文件混淆。在最坏的情况将它复制并暂时放在一个非常基本的版本,以获得更多的调试......

sudo vi /my/etc.cnf 

[mysqld_safe] 
log_error=/var/log/mysql_error.log 

[mysqld] 
log_error=/var/log/mysqld_error.log