mysql 有关“InnoDB Error ib_logfile0 of different size”错误
程序员文章站
2023-12-18 23:24:58
1,查看mysqld(/var/log/mysqld.log)日志,发现以下错误:innodb: error: log file /usr/local/mysql/data...
1,查看mysqld(/var/log/mysqld.log)日志,发现以下错误:
innodb: error: log file /usr/local/mysql/data/ib_logfile0 is of different size 0
5242880 bytes
innodb: than specified in the .cnf file 0 104857600 bytes!
030826 1:42:15 can't init databases
030826 1:42:15 aborting
2,解决办法
"
if you want to change the number or the size of your innodb log files, you
have to shut down mysql and make sure that it shuts down without errors.
then copy the old log files into a safe place just in case something went
wrong in the shutdown and you will need them to recover the database. delete
then the old log files from the log file directory, edit my.cnf, and start
mysql again. innodb will tell you at the startup that it is creating new log
files.
"
在你修改my.cnf的innodb_log_file_size参数前,请先停止mysql服务程序的运行(mysql的停止没有出现任何错误),并把/var/lib/mysql目录下的ib_logfile0、ib_logfile1、ib_logfile2等之类的文件移除到一个安全的地方(旧日志文件的保留是为了防止意外的出现),以便mysql重启后可以将新的ib_logfile0之类日志文件生成到/var/lib/mysql目录下。如果没有什么意外,旧的日志文件可以删除。
innodb: error: log file /usr/local/mysql/data/ib_logfile0 is of different size 0
5242880 bytes
innodb: than specified in the .cnf file 0 104857600 bytes!
030826 1:42:15 can't init databases
030826 1:42:15 aborting
2,解决办法
"
if you want to change the number or the size of your innodb log files, you
have to shut down mysql and make sure that it shuts down without errors.
then copy the old log files into a safe place just in case something went
wrong in the shutdown and you will need them to recover the database. delete
then the old log files from the log file directory, edit my.cnf, and start
mysql again. innodb will tell you at the startup that it is creating new log
files.
"
在你修改my.cnf的innodb_log_file_size参数前,请先停止mysql服务程序的运行(mysql的停止没有出现任何错误),并把/var/lib/mysql目录下的ib_logfile0、ib_logfile1、ib_logfile2等之类的文件移除到一个安全的地方(旧日志文件的保留是为了防止意外的出现),以便mysql重启后可以将新的ib_logfile0之类日志文件生成到/var/lib/mysql目录下。如果没有什么意外,旧的日志文件可以删除。
推荐阅读
-
mysql 有关“InnoDB Error ib_logfile0 of different size”错误
-
Mysql启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes 的问题
-
mysql 有关“InnoDB Error ib_logfile0 of different size”错误
-
Mysql启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes 的问题
-
Mysql启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 by
-
Mysql启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 by
-
Mysql启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes 的问题
-
Mysql启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 by
-
InnoDB: Error: log file ./ib_logfile0 is of different size 0_MySQL
-
Mysql启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes 的问题