更改innodb_log_file_size, 解決InnoDB: ERROR: the ag...

有時侯Mysql會報錯:mysql

120418  8:00:14  InnoDB: ERROR: the age of the last checkpoint is 9434204,
InnoDB: which exceeds the log group capacity 9433498.
InnoDB: If you are using big BLOB or TEXT rows, you must set the
InnoDB: combined size of log files at least 10 times bigger than the
InnoDB: largest such rowsql

這主要是因爲 innodb_log_file_size 默認是5M, 不夠用引發的.ci

增大innodb_log_file_size的方法:it

  1. 暫停mysql, /etc/init.d/mysql stop
  2. 轉移ib_logfile0和ib_logfile1,   mv /usr/local/mysql/var/ib_logfile* ../
  3. 編輯my.cnf  ,  增長  innodb_log_file_size=64M
  4. 啓動mysql,  /etc/init.d/mysql start
相關文章
相關標籤/搜索