MySQL不停重启问题

MySQL不停的自动杀掉自动重启

看一下log日志 my.cnf 里配置的 log_error =/var/log/mysqld.log

vim /var/log/mysqld.log

报的错误只是

ERROR\] Can't start server: Bind on TCP/IP port: Address already in use \[ERROR\] Do you already have another mysqld server running on port: 3306 ? 除了MySQL自己的那个3306 其它没有进程有占用这个端口 MySQL自己一直在不停重启 网上搜了很多 其中看到 加上一行 innodb_force_recovery=4 可以先不让MySQL重启 试了不行 还是不停的重启 sudo /usr/local/mysql/bin/mysqld --console 查看发现 \[ERROR\] Can't find messagefile \*\*\* 2023-08-22 22:06:24 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2023-08-22 22:06:24 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 2023-08-22 22:06:24 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.47-87.0) starting as process 7763 ... 2023-08-22 22:06:24 7763 [ERROR] Can't find messagefile '/usr/local/Percona-Server-5.6.47-rel87.0-Linux.x86_64.ssl101/share/errmsg.sys' 2023-08-22 22:06:24 7763 [Warning] Can't create test file /usr/local/Percona-Server-5.6.47-rel87.0-Linux.x86_64.ssl101/data/iZ8vbidmq7xeaamvtoal4wZ.lower-test 2023-08-22 22:06:24 7763 [Warning] Can't create test file /usr/local/Percona-Server-5.6.47-rel87.0-Linux.x86_64.ssl101/data/iZ8vbidmq7xeaamvtoal4wZ.lower-test /usr/local/mysql/bin/mysqld: Can't change dir to '/usr/local/Percona-Server-5.6.47-rel87.0-Linux.x86_64.ssl101/data/' (Errcode: 2 - No such file or directory) 2023-08-22 22:06:24 7763 [ERROR] Aborting 2023-08-22 22:06:24 7763 [Note] Binlog end 2023-08-22 22:06:24 7763 [Note] sudo vim /usr/local/mysql/my.cnf 加上一行 lc-messages-dir=/usr/local/mysql/share/ 目录指定成mysql安装目录下的share目录 再启动MySQL 发现可以了 不一直自动重启了 访问站点发现表都是只读的 需要去掉my.cnf中配置的innodb_force_recovery=4 ![](https://file.jishuzhan.net/article/1695446111340204033/e75a3d4464964a789533def13435ba75.png) 然后重启MySQL 然后MySQL正常运行了 正常运行后再 sudo /usr/local/mysql/bin/mysqld --console 看时 依然有\[ERROR\] Can't find messagefile \*\*\* ![](https://file.jishuzhan.net/article/1695446111340204033/4da255aff4644e24bf67b434412133e9.png) 后面去掉my.cnf中的lc-messages-dir=/usr/local/mysql/share/ 这一行 再重启一下MySQL 发现MySQL还是正常的 。。 先不纠结了

相关推荐
成为你的宁宁22 分钟前
【Redis 从入门到实战:详细讲解 Redis 安装配置、RDB/AOF 数据持久化方案、一主两从同步部署,深入剖析哨兵模式工作原理与哨兵模式高可用全攻略】
数据库·redis·缓存
云和数据.ChenGuang24 分钟前
r=re.search(r‘data-original=“(.*?)“‘, line)指令解析
数据库·mysql·r语言
v***5651 小时前
使用bitnamiredis-sentinel部署Redis 哨兵模式
数据库·redis·sentinel
2501_941111821 小时前
使用Python进行网络设备自动配置
jvm·数据库·python
m***11902 小时前
MySQL官网驱动下载(jar包驱动和ODBC驱动)【详细教程】
数据库·mysql
debug骑士2 小时前
云原生边缘计算系统在工业物联网中的实时智能调度与优化策略研究
mysql
chxii2 小时前
第六章:MySQL DQL 表之间的关系 自连接 一对一、一对多、多对一、多对多
java·前端·mysql
煎蛋学姐3 小时前
SSM基于J2EE的山西旅游网站的设计与实现iiqmx(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
java·数据库·java-ee·ssm 框架·山西旅游网站·在线预订系统
咸甜适中3 小时前
rust语言,将JSON中的所有值以字符串形式存储到sqlite数据库中(逐行注释)
数据库·rust·sqlite·json
树下水月3 小时前
python 连接hive2 数据库
开发语言·数据库·python