Can't start server: can't create PID file: Permission denied
mysql 启动报错,查看日志显示如下信息
解决方式:
1.将 /var/run/mysqld 下的文件删除
rm -rf /var/run/mysqld/
2.建立新的文件
mkdir -p /var/run/mysqld/
3.赋予权限
chown -R mysql:mysql /var/run/mysqld/
4.重启mysql
systemctl restart mysqld