Can't Change to Run as User 'Mysql'. Please Check That the User Exists!

So you’ve recently made a change to your mysql installation and see the following in

 /var/lib/mysql/localhost.localdomain.err

 

080317 14:08:50 mysqld started
080317 14:08:50 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists!
080317 14:08:50 [ERROR] Aborting

080317 14:08:50 [Note] /usr/sbin/mysqld: Shutdown complete

080317 14:08:50 mysqld ended

 This is a problem that many a time spent on google has not found the result, so I am writing here what exactly to do in this situation …

 First off

 cd /var/lib/mysql

Now run

ls -la

 No doubt you will see something similar to this:

drwx--x--x   2 27 mysql     4096 Mar 17 14:05 mysql

Notice the “27 mysql”, the user no longer existsing in /etc/passwd.

This is fairly simple to fix.

adduser mysql
chown mysql:mysql -R /var/lib/mysql

Now start up Mysql i.e. “service start mysql” and everyhing should be fine.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值