首页 文章

MySQL启动时的InnoDB错误

提问于
浏览
0

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

1 回答

  • 0

    它不会启动,因为你改变了你的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

相关问题