MySQL启动时出现InnoDB错误

MySQL启动时出现InnoDB错误,mysql,innodb,Mysql,Innodb,在启动MySQL时,我发现以下InnoDB错误 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead. [Warning] 'record_buffer'

在启动MySQL时,我发现以下InnoDB错误

mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead. [Warning] 'record_buffer' is deprecated and will be removed in a future release. Please use 'read_buffer_size' instead. [Note] Plugin 'FEDERATED' is disabled. InnoDB: Initializing buffer pool, size = 8.0M InnoDB: Completed initialization of buffer pool log file ./ib_logfile0 is of different size 0 503316480 bytes InnoDB: than specified in the .cnf file 0 5242880 bytes! [ERROR] Plugin 'InnoDB' init function returned error. [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. [Note] Event Scheduler: Loaded 0 events [Note] /usr/sbin/mysqld: ready for connections. Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 12485 MySQL Community Server (GPL) [Note] /usr/sbin/mysqld: Normal shutdown
它不会启动,因为您更改了innodb日志文件的大小,或者在本例中;您对它进行了注释,MySQL现在使用默认值

log file ./ib_logfile0 is of different size 0 503316480 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
如果您的MySQL数据库中有数据,我建议您通过删除哈希标记将innodb日志文件大小值恢复为原始值:

innodb_log_file_size=503316480
另外,如果你真的有兴趣改变这个设置;要知道这很棘手,因为最终可能会丢失数据。
如果您真的需要更改此设置,请遵循MySQL.com上的以下指南:

i hame超过200个sql数据库。请解释更多请帮助我,我真的很可怜。出于数据完整性的原因,SQL不会让您动态更改该设置。如果将innodb_log_file_大小设置恢复为其原始值,则不会丢失任何数据。现在,我在阅读问题时遇到了另一个问题-您可能发生了崩溃或硬件故障。不幸的是,我从未尝试过InnoDB恢复。我只知道它是手动的,您需要重新创建每个损坏的表。看见
innodb_log_file_size=503316480