2016-03-09T07:51:38.905444Z 0 [ERROR] /usr/sbin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2 - No such file or directory)
2016-03-09T07:51:38.905481Z 0 [ERROR] Can't start server: can't create PID file: No such file or directory
2016-03-09T07:51:38.931861Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
/var/run/mysqld/mysqld.pid这个文件路径是在“/etc/init.d/mysqld”中配置的
解决:
1、创建文件
cd /var/run
mkdir mysqld
cd mysqld
touch mysqld.pid
sync
2、修改 /var/run/mysqld/权限为mysql
chown -R mysql /var/run/mysqld
chgrp -R mysql /var/run/mysqld
chmod 777 /var/run/mysqld
再次重启,成功。