mysqld: File './binlog.000007' not found (OS errno 2 - No such file or directory)
2019-06-10T01:08:57.188811Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.16) starting as process 2210
2019-06-10T01:08:57.871257Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2019-06-10T01:08:57.871297Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2019-06-10T01:08:57.873856Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-06-10T01:08:59.423691Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.16) MySQL Community Server - GPL.
Does anyone know how to fix it?
In the same directory, you’ll find binlog.index file. windows: C:\Program Files\MySQL\MySQL Server X.0\data\binlog.index Linux: /var/lib/mysql/binlog.index Remove entry of './binlog.000007' and restart the server..
Woohoo, I found it! For now, at least. Digging through the source suggests that this might have something to do with mmap() calls, and lo and behold – VirtualBox has a bug in that area. Fortunately that same source hints at a workaround – the log_bin option. Enable this (either from the command line as --log_bin or from the config file as log_bin=ON) and things start to work again!
Dude – if you think you “accidentally deleted the file” … then did you try RESTARTING THE MYSQL? If the restart fixed the problem – great. If it didn’t … do you really think mysql wouldn’t recreate the file itself??? Would you at least CONSIDER trying log_bin=ON (or equivalent)? – paulsm4Jun 10, 2019 at 4:41
Q: Have you found the problem? Q: Did you try setting log_bin and restarting mysql? – paulsm4Jun 10, 2019 at 20:28