我过去没有做太多的调整,所以这可能相对容易,但我遇到了问题.这就是我做的:
innodb_log_file_size)开始没问题,但所有InnoDB表都有.frm文件无效错误,状态显示InnoDB引擎被禁用,所以我显然回去,删除更改,一切都恢复正常.
我能够改变我尝试过的所有其他变量,但我似乎无法找出为什么即使在删除日志文件后InnoDB也无法启动.我错过了什么吗?
谢谢.
编辑:粘贴下面的日志 - 看起来它似乎仍然找到日志文件,即使它们不存在?
关掉:
090813 10:00:14 InnoDB: Starting shutdown...
090813 10:00:17 InnoDB: Shutdown completed; log sequence number 0 739268981
090813 10:00:17 [Note] /usr/sbin/mysqld: Shutdown complete
Run Code Online (Sandbox Code Playgroud)
进行更改后启动:
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 268435456 bytes!
090813 11:00:18 [Warning] 'user' entry 'root@XXXXX.com' ignored in --skip-name-resolve mode.
090813 11:00:18 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.81-community-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition (GPL)
090813 11:00:19 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './XXXX/User.frm'
090813 11:00:19 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './XXXX/User.frm'
090813 11:00:19 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './XXXX/User.frm'
Run Code Online (Sandbox Code Playgroud)
它只是一个相同错误的垃圾邮件,直到我纠正它
当它重新创建日志文件后启动它所以它必须在同一个地方寻找我.
Leo*_*ins 15
首先,我必须指出,在InnoDB数据文件的任何变形之前,应该读取13.2.5.添加,删除或调整InnoDB数据和日志文件的大小.
你指出的步骤几乎是正确的.建议在此类更改之前进行备份.让我们看看你发生了什么:
错误消息
Run Code Online (Sandbox Code Playgroud)InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes InnoDB: than specified in the .cnf file 0 268435456 bytes!
是由更改innodb_log_file_size的大小而不删除旧文件引起的.可能你忘了ib_logfile0/1在更改后第一次运行mysqld时删除de .消息
Run Code Online (Sandbox Code Playgroud)090813 11:00:18 [Note] /usr/sbin/mysqld: ready for connections.
表明您已解决此问题(通过删除ib_logfiles).但是,在删除它们时,您会产生另一个问题.XXXX\User.frm的数据损坏或InnoDB Engine的某些问题.
要确保启用InnoDB,请在mysql提示符上运行此命令:
show variables like "%inno%";
Run Code Online (Sandbox Code Playgroud)
在结果列表中必须有" have_innodb = YES".有时当InnoDB 无法启动(值为NO或DISABLED)时,Incorrect information in file消息会出现.
- 如果这是问题,你已经改变了阻止InnoDB引擎正常启动的其他东西(datadir的权限或tmpdir的权限,其他innodb变量(你没有显示完整的日志.)等).查看更改或放置.cnf文件(之前和之后).
- 如果InnoDB引擎YES那么你必须修复表.(如果是这种情况,请添加评论,我会在这里添加信息.我现在太懒了.)