mysql 日志文件全是0_mysql – InnoDB:错误:日志文件./ib_logfile0的大小不同

在我将一个数据库转换为使用InnoDB引擎后,我刚刚在/etc/

mysql/my.cnf中添加了以下行.

innodb_buffer_pool_size = 2560M

innodb_log_file_size = 256M

innodb_log_buffer_size = 8M

innodb_flush_log_at_trx_commit = 2

innodb_thread_concurrency = 16

innodb_flush_method = O_DIRECT

但它引发了“ERROR 2013(HY000)第2行:在查询期间丢失与MySQL服务器的连接”错误重启mysqld.并且mysql错误日志显示以下内容

InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes

InnoDB: than specified in the .cnf file 0 268435456 bytes!

100118 20:52:52 [ERROR] Plugin 'InnoDB' init function returned error.

100118 20:52:52 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

100118 20:52:52 [ERROR] Unknown/unsupported table type: InnoDB

100118 20:52:52 [ERROR] Aborting

所以我评论了这一行

# innodb_log_file_size = 256M

它成功重启了mysql.

我想知道mysql错误中显示的“5242880字节的日志文件”是什么?它是此服务器上InnoDB引擎上的第一个数据库,因此该日志文件何时何地创建?在这种情况下,如何在my.cnf中启用innodb_log_file_size指令?

编辑

我试图删除/ var / lib / mysql / ib_logfile0并重新启动mysqld但它仍然失败.它现在在错误日志中显示以下内容.

100118 21:27:11 InnoDB: Log file ./ib_logfile0 did not exist: new to be created

InnoDB: Setting log file ./ib_logfile0 size to 256 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100 200

InnoDB: Error: log file ./ib_logfile1 is of different size 0 5242880 bytes

InnoDB: than specified in the .cnf file 0 268435456 bytes!

解析度

在删除/ var / lib / mysql中的ib_logfile0和ib_logfile1后,它现在可以正常工作

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值