mysql初始化后,找不到pid没法正常启动

  • 背景:
    • centos7.0版本,安装的是mysql5.6版本
  • 问题:
    • 在安装好mysql,并设置开机启动,可是在关机重启后,会发现Mysql服务没法启动
[root@hf-01 ~]# ps aux |grep mysql
root      2329  0.0  0.0 112676   984 pts/0    R+   17:05   0:00 grep --color=auto mysq
[root@hf-01 ~]# service mysqld start
Starting MySQL. ERROR! The server quit without updating PID file (/data/mysql/hf-01.pid).
[root@hf-01 ~]#
  • 解决方法:
    • 进入到/data/mysql目录下,删除ib_logfile0和ib_logfile1文件
    • 而后重启虚拟机,就会看到mysql服务正常启动
[root@hf-01 data]# cd /data/mysql/
[root@hf-01 mysql]# ls
aria_log.00000001  hanfeng.err     ibdata1      multi-master.info   test
aria_log_control   hf-01.err       ib_logfile0  mysql
auto.cnf           ib_buffer_pool  ib_logfile1  performance_schema
[root@hf-01 mysql]# rm -rf ib_logfile1
[root@hf-01 mysql]# rm -rf ib_logfile0
[root@hf-01 mysql]# ls
aria_log.00000001  hanfeng.err     ibdata1            performance_schema
aria_log_control   hf-01.err       multi-master.info  test
auto.cnf           ib_buffer_pool  mysql
相关文章
相关标签/搜索