MAMP Mysql Error - Could Not Open Log

I have been working with the MAMP installation for several weeks, and when I started it today, it did not start. The mysql process is not running, so I checked the error log, which shows the following when the server starts:

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 

So it’s clear that a specific log file was not found, but I don’t know why this happened or how to fix it.

+4
source share
1 answer

It seems that one of the binary log files, Applications/MAMP/db/mysql/mysql-bin.000025 , was corrupted or deleted (it was no longer there, and I did not delete it manually).

After doing some research and searching for this publication, I was able to fix this by going to /Applications/MAMP/db/mysql and manually editing mysql-bin.index to no longer include the missing log file.

I was still a little confused about what led to this problem initially, though, since I usually shut down my MAMP server and never touched the binary log files ...

+9
source

Source: https://habr.com/ru/post/1498946/


All Articles