目次

起動エラー

innodb_log_file_size変更後のエラー

事象

innodbのログファイルサイズを変更した際、正しい段取りを踏まないと以下のエラーが発生する。

  • エラー内容
    InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
    InnoDB: than specified in the .cnf file 0 524288000 bytes!
    140319 12:21:55 [ERROR] Plugin 'InnoDB' init function returned error.
    140319 12:21:55 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    140319 12:21:55 [ERROR] Unknown/unsupported storage engine: InnoDB
    140319 12:21:55 [ERROR] Aborting

対策

以下の手順にて対策を行う。

  • 1. MySQLに管理者権限でアクセスし、以下を実行
    mysql> SET GLOBAL innodb_fast_shutdown=0;
  • 2. MySQLを停止する
    /etc/init.d/mysqld stop
  • 3. 既存のログファイルを退避
    cd [MySQLのDB領域]
    mv ib_logfile* /tmp
  • 4. innodb_log_file_sizeを適正値に変更
  • 5. MySQLを起動
    /etc/init.d/mysqld start


起動時にログファイルが生成されるため、初回起動時には通常より若干時間がかかる。


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2014-03-19 (水) 12:36:05 (3691d)