2015-10-15 61 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 
相關問題