错误信息: 

[ERROR] /usr/sbin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2 - No such file or directory)
2018-10-16T12:58:13.166990Z 0 [ERROR] Can't start server: can't create PID file: No such file or directory
解决方案:

 1、查看是否存在mysqld 运行目录

      到/var/run目录下查看:
       [root@ora10g mysql]# cd /var/run
       [root@ora10g run]# ls -l mysqld*
       ls: mysqld*: No such file or directory

2、如果目录不存在,就创建

       mkdir /var/run/mysqld

3、给新建的mysqld目录授权

       chown mysql:mysql /var/run/mysqld -R

4、重启mysql服务

       systemctl restart mysqld

 

Logo

更多推荐