MAMP Mysql错误 - 无法打开日志

Joh*_*nes 8 mysql binary-log mamp error-log

我已经使用MAMP安装了几个星期了,当我今天启动它时它就无法启动.没有运行mysql进程所以我检查了错误日志,当我启动服务器时显示以下内容:

130826 14:19:55 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
130826 14:19:55 [Warning] You have forced lower_case_table_names to 0 through a command-line option, even though your file system '/Applications/MAMP/db/mysql/' is case insensitive.  This means that you can corrupt a MyISAM table by accessing it with different cases. You should consider changing lower_case_table_names to 1 or 2
130826 14:19:55 [Warning] One can only use the --user switch if running as root

130826 14:19:55 [Note] Plugin 'FEDERATED' is disabled.
130826 14:19:55 InnoDB: The InnoDB memory heap is disabled
130826 14:19:55 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130826 14:19:55 InnoDB: Compressed tables use zlib 1.2.3
130826 14:19:55 InnoDB: Initializing buffer pool, size = 128.0M
130826 14:19:55 InnoDB: Completed initialization of buffer pool
130826 14:19:55 InnoDB: highest supported file format is Barracuda.
130826 14:19:55  InnoDB: Waiting for the background threads to start
130826 14:19:56 InnoDB: 1.1.8 started; log sequence number 4057202289
/Applications/MAMP/Library/bin/mysqld: File './mysql-bin.000025' not found (Errcode: 2)
130826 14:19:56 [ERROR] Failed to open log (file './mysql-bin.000025', errno 2)
130826 14:19:56 [ERROR] Could not open log file
130826 14:19:56 [ERROR] Can't init tc log
130826 14:19:56 [ERROR] Aborting

130826 14:19:56  InnoDB: Starting shutdown...
130826 14:19:57  InnoDB: Shutdown completed; log sequence number 4057202289
130826 14:19:57 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete

130826 14:19:57 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
Run Code Online (Sandbox Code Playgroud)

所以很明显无法找到某个日志文件,但我不知道为什么会发生这种情况,或者如何修复它.

Joh*_*nes 17

似乎其中一个二进制日志文件Applications/MAMP/db/mysql/mysql-bin.000025被破坏或删除(它不再存在,我没有手动删除它).

在做了一些研究并找到这篇文章后,我能够通过导航到/Applications/MAMP/db/mysql手动编辑 mysql-bin.index来解决这个问题,不再包含丢失的日志文件.

我仍然有点困惑最初导致这个问题,因为我正常关闭我的MAMP服务器,从未触及二进制日志文件......


Al *_*ndy 6

对于 MySQL 8.0,文件mysql-bin.index更改为binlog.index. 在这种情况下,删除并重新启动 MySQL 可以解决问题。