在linux环境下安装完mysql后,下一次打开出现
Starting mysqld (via systemctl): Failed to issue method call: Access denied
[FAILED]
用root用户权限登录后,再次输入service mysqld start,还是出现
Starting mysqld (via systemctl): Job for mysqld.service failed. See 'systemctl status mysqld.service' and 'journalctl -xn' for details.
[FAILED]
的问题。
解决办法:依次输入命令
mkdir -p /var/run/mysqld
ls -ld /var/run/mysqld/
chown mysql.mysql /var/run/mysqld/
service mysqld start
如图:已经打开了Mysql.