繁体   English   中英

MySQL 启动时的 InnoDB 错误

[英]InnoDB Error on MySQL Startup

启动 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

my.conf的内容是:

[mysqld]

 local-infile=0

 port = 12485

#skip-innodb

#socket=/var/lib/mysql/mysql.sock

#innodb_log_file_size=503316480

#innodb_force_recovery=6

skip-locking

query_cache_limit=1M

query_cache_size=4M

query_cache_type=1

max_allowed_packet=800M

max_connections=2000

interactive_timeout=1000

wait_timeout=1000

connect_timeout=100

thread_cache_size=8

key_buffer=8M

join_buffer=1M

table_cache=100

record_buffer=1M

sort_buffer_size=2M

read_buffer_size=2M

max_connect_errors=200

thread_concurrency=1

myisam_sort_buffer_size=4M

server-id=1

[safe_mysqld]

err-log=/var/log/mysqld.log

open_files_limit=400

[mysqldump]

quick

[mysql]

#default-storage-engine=myisam

no-auto-rehash

#safe-updates

[isamchk]

key_buffer=4M

sort_buffer=4M

read_buffer=4M

write_buffer=4M

[myisamchk]

key_buffer=4M

sort_buffer=4M

read_buffer=4M

write_buffer=4M

它不会启动,因为您更改了 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 上的本指南进行操作: http : //dev.mysql.com/doc/refman/5.1/en/innodb-data-log-reconfiguration.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM