Job for mysqld.service failed in Centos 7

后端 未结 2 1052
悲&欢浪女
悲&欢浪女 2021-02-19 07:40

OS:Centos 7 Linux 3.10.0-229.el7.x86_64

MySQL: mysql57-community-release-el7-7.noarch.rpm

I installed MySQL server

相关标签:
2条回答
  • 2021-02-19 08:11

    For me the above answer did not help, so here is my solution.

    Find out open mysqld process

    ps -ef | grep mysqld

    And kill all those process

    pkill -9 mysqld

    Finally start it the same by using

    systemctl start mariadb

    Issue resolved....

    0 讨论(0)
  • 2021-02-19 08:28

    Check below things to fix the issue

    1. Check the permission of mysql data dir using below command. The ownership should be mysql:mysql and the directory permission should be 700

      # ls -ld /var/lib/mysql/

    2. Check the permission of databases inside mysql data dir using below command. The ownership should be mysql:mysql for all the files inside that directory

      # ls -lh /var/lib/mysql/

    3. Check the listening network tcp ports using below command

      # netstat -ntlp

    4. Check the mysql log files for any error using below command.

      # cat /var/log/mysql/mysqld.log

    5. Try to start mysql using below command

      # mysqld_safe --defaults-file=/etc/my.cf

    0 讨论(0)
提交回复
热议问题