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
相關文章
相關標籤/搜索