我做了什么导致了错误:
- 由于空间不足,我在 Linux 服务器中手动删除了 bin 日志文件 问题:无法启动 MySql
命令:服务mysql状态
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Thu 2021-01-28 12:46:17 UTC; 3 days ago
Main PID: 17328 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Jan 28 12:46:17 ubuntu systemd[1]: Stopped MySQL Community Server.
/var/log/mysql/error.log
2021-02-01T02:05:15.392838Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-02-01T02:05:16.300996Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-02-01T02:05:16.632810Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible'
2021-02-01T02:05:16.633795Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
mysqld: File './binlog.004716' not found (OS errno 2 - No such file or directory)
2021-02-01T02:05:16.701858Z 0 [ERROR] [MY-010958] [Server] Could not open log file.
2021-02-01T02:05:16.702508Z 0 [ERROR] [MY-010041] [Server] Can't init tc log
2021-02-01T02:05:16.703740Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-02-01T02:05:18.105975Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22-0ubuntu0.20.04.2) (Ubuntu)
/var/lib/mysql/binlog.index
lots of files in the following format
./binlog.003926
./binlog.003927
我找不到任何帮助像我这样的傻瓜修复数据库启动错误。
非常感谢任何帮助
最佳答案
我发现打开 .index 文件并删除所有条目(在复制后以防万一)服务会启动并再次运行
关于Linux 中删除 MySQL BinLog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65986569/