【原创】解决MySQL报错:Fatal error: Can't change to run as user 'mysql';Please check that the user exists!

blogdaren 2018-06-29 抢沙发 1153人次

问题背景:

XAMMP集成包,运行 /opt/lampp/lampp startmysql,终端显示:starting ok...,然发现mysqld服务并没有启动。

问题排查:

打开 /opt/lampp/etc/my.cnf,在[mysqld]段末尾增加日志指令,以便排查问题:

[mysqld]
#......
#......
log-error=/var/log/mysqld.log

问题原因:

最后定位 /var/log/mysqld.log 日志发现:

2018-06-29 01:39:55 10195 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists! 

问题解决:

# useradd mysql
# chown  -R mysql:mysql  /opt/lampp/var/mysql/

版权声明:除非注明,本文由( blogdaren )原创,转载请保留文章出处。

本文链接:【原创】解决MySQL报错:Fatal error: Can't change to run as user 'mysql';Please check that the user exists!

发表评论:

您的昵称:
电子邮件:
个人主页: