我已经安装了便携式 Xampp在我的闪存盘上。
这是我尝试在便携式 XAMPP 服务器上启动 MySQL 时得到的结果。(Apache 启动时没有任何失败)
日志看起来像这样
121003 22:07:31 [Note] Plugin 'FEDERATED' is disabled.
121003 22:07:31 InnoDB: The InnoDB memory heap is disabled
121003 22:07:31 InnoDB: Mutexes and rw_locks use Windows interlocked functions
121003 22:07:31 InnoDB: Compressed tables use zlib 1.2.3
121003 22:07:31 InnoDB: Initializing buffer pool, size = 16.0M
121003 22:07:31 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file \xampp\mysql\data\ib_logfile1 is of different size 0 0 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
121003 22:07:31 [ERROR] Plugin 'InnoDB' init function returned error.
121003 22:07:31 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
121003 22:07:31 [ERROR] Unknown/unsupported storage engine: InnoDB
121003 22:07:31 [ERROR] Aborting
121003 22:07:31 [Note] e:\xampp\mysql\bin\mysqld.exe: Shutdown complete
我遗漏了什么?如何解决此问题?
答案1
停止 MySQL
对日志文件大小进行配置更改。
删除两个日志文件。
启动 MySQL。它会抱怨缺少日志文件,但它会创建它们,一切都会好起来。
innodb_buffer_pool_size = 2560M innodb_log_file_size = 256M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit = 2 innodb_thread_concurrency = 16 innodb_flush_method = O_DIRECT
移动 innodb 旧日志文件并重新启动 Mysql 服务器
mv ib<filenames> ib<filenames>.old