Linux下MySQL服务启动报错常见的现象详解
配置文件修改错误导致的
1、修改mysql配置文件,故意修改错,重启mysql会起不来,日志报错如下

200329 23:16:06 [Note] Plugin 'FEDERATED' is disabled.
200329 23:16:06 InnoDB: The InnoDB memory heap is disabled
200329 23:16:06 InnoDB: Mutexes and rw_locks use GCC atomic builtins
200329 23:16:06 InnoDB: Compressed tables use zlib 1.2.8
200329 23:16:06 InnoDB: Using Linux native AIO
200329 23:16:06 InnoDB: Initializing buffer pool, size = 128.0M
200329 23:16:06 InnoDB: Completed initialization of buffer pool
200329 23:16:06 InnoDB: highest supported file format is Barracuda.
200329 23:16:06 InnoDB: Waiting for the background threads to start
200329 23:16:07 InnoDB: 5.5.55 started; log sequence number 88739164
200329 23:16:07 [ERROR] /usr/sbin/mysqld: unknown variable 'charaset-set-server=utf8'
200329 23:16:07 [ERROR] Aborting

注意:我们通过错误日志就可以看出找不到我们charaset-set-server=utf8的配置,所以无法重启。
mysql-bin.index文件保留的记录发生了错乱或丢失
- 注意:mysql-bin.index是收集整理的mysql修改/切换binlog存储位置以及重置mysql-bin的index全部内容。

- 举例:我们删除一个binlog文件
- 删除后重启MySQL

解决办法:在mysql-bin.index中这个报错行删除即可重启。