日期:2014-05-16 浏览次数:20504 次
innodb 日志文件异常引起innodb 启动失败
110531 09:19:16 mysqld_safe Starting mysqld daemon with databases from /data/mysql_data
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
110531 9:19:17 InnoDB: Initializing buffer pool, size = 1.0G
110531 9:19:17 InnoDB: Completed initialization of buffer pool
110531 9:19:17 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 10 MB
(日志文件异常)
InnoDB: Database physically writes the file full: wait...
InnoDB: Error: all log files must be created at the same time.
InnoDB: All log files must be created also in database creation.
InnoDB: If you want bigger or smaller log files, shut down the
InnoDB: database and make sure there were no errors in shutdown.
InnoDB: Then delete the existing log files. Edit the .cnf file
(需要删除redo文件,重建)
InnoDB: and start the database again.
110531 9:19:17 [ERROR] Plugin 'InnoDB' init function returned error.
110531 9:19:17 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
110531 9:19:17 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
110531 9:19:17 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. The table is probably corrupted
110531 9:19:17 [ERROR] mysql.user has no `Event_priv` column at position 29
110531 9:19:17 [ERROR] Cannot open mysql.event
110531 9:19:17 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
110531 9:19:17 [Note] /usr/local/mysql-5.1.57/bin/mysqld: ready for connections.
Version: '5.1.57-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
110531 9:22:09 [Warning] Statement may not be safe to log in statement format. Statement: ALTER TABLE general_log
MODIFY event_time TIMESTAMP NOT NULL,
MODIFY user_host MEDIUMTEXT NOT NULL,
MODIFY thread_id INTEGER NOT NULL,
MODIFY server_id INTEGER UNSIGNED NOT NULL,
MODIFY command_type VARCHAR(64) NOT NULL,
MODIFY argument MEDIUMTEXT NOT NULL
110531 9:22:09 [Warning] Statement may not be safe to log in statement format. Statement: ALTER TABLE slow_log
MODIFY start_time TIMESTAMP NOT NULL,
MODIFY user_host MEDIUMTEXT NOT NULL,
MODIFY query_time TIME NOT NULL,
MODIFY lock_time TIME NOT NULL,
MODIFY rows_sent INTEGER NOT NULL,
MODIFY rows_examined INTEGER NOT NULL,
MODIFY db VARCHAR(512) NOT NULL,
MODIFY last_insert_id INTEGER NOT NULL,
MODIFY insert_id INTEGER NOT NULL,
MODIFY server_id INTEGER UNSIGNED NOT NULL,
MODIFY sql_text MEDIUMTEXT NOT NULL
? 解决办法:
删除ib_logfile0 ib_logfile1 文件
重启mysql服务。