crazy_kis
2020-10-18 21:38
采纳率: 0%
浏览 553

mysql数据库无法启动 mysqld_safe mysqld from pid file /var/lib/mysql/mysqld.pid ended

今天下午我们的测试服务器上的数据库不知道怎么就挂掉了,

然后就一直启动不了

201018 20:13:23 mysqld_safe Starting mysqld daemon with databases from /opt/mysql
201018 20:13:29 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
201018 20:22:37 mysqld_safe Starting mysqld daemon with databases from /opt/mysql
201018 20:22:43 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
201018 20:29:01 mysqld_safe Starting mysqld daemon with databases from /opt/mysql
201018 20:29:08 mysqld_safe mysqld from pid file /var/lib/mysql/mysqld.pid ended
201018 20:30:28 mysqld_safe Starting mysqld daemon with databases from /opt/mysql
201018 20:30:34 mysqld_safe mysqld from pid file /var/lib/mysql/mysqld.pid ended

一直报这个错误;

尝试了3个办法:
1、查了一下 mysqld.pid 确实不存在,手动touch一个把读写权限都给出来,启动时会自己删除掉

把pid目录指向 修改后,还是启动报错,启动不成功

2、执行mysqld_safe

也是一样报错

[root@iZuf6hbcmowi6ktvho935eZ mysql]# mysqld_safe 
201018 21:35:26 mysqld_safe Logging to '/var/log/mysqld.log'.
201018 21:35:26 mysqld_safe Starting mysqld daemon with databases from /opt/mysql
/usr/bin/mysqld_safe: line 166: 27607 已杀死               nohup /usr/sbin/mysqld --basedir=/usr --datadir=/opt/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --open-files-limit=20000 --pid-file=/var/lib/mysql/mysqld.pid --socket=/opt/mysql/mysql.sock --port=13306 < /dev/null >> /var/log/mysqld.log 2>&1
201018 21:35:32 mysqld_safe mysqld from pid file /var/lib/mysql/mysqld.pid ended

在线求解,求提示

网上也查了一些帖子
1、说是内存原因,调整内存配置,但我在服务器上把其他应用停掉,16G内存服务器只留这个mysql,也启动不起来
2、删除$data_dir目录下的ib_logfile0.... 等等这几个文件,启动不起来

好无奈,只能重装了吗? 测试数据要没有了

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题