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中这个报错行删除即可重启。
点击关注发私信或评论交流文章中有问题的地方,相互学习和答疑
相关推荐
-
第18问:MySQL CPU 高了,怎么办?2025-02-24 10:27:18
-
mysql索引类型 normal, unique, full text
mysql索引类型 normal, unique, full text2025-02-24 10:05:05 -
uwsgi+django+nginx 搭建部分总结2025-02-24 10:03:33
-
使用Docker配置Nginx环境部署Nextcloud2025-02-24 10:02:03
-
Nginx安装和怎么使用2025-02-24 10:00:45