I'm sorry if this question has already been asked, but I can't find any solution to this (maybe small) issue:
I just made a fresh install of mysql-server 5.7 on a 14.04 server. Every time the MySQL service starts, I get this error:
root@xxx:/etc/mysql# service mysql restart * Stopping MySQL Community Server 5.7.11
... * MySQL Community Server 5.7.11 is stopped * Re-starting MySQL Community Server 5.7.11
No directory, logging in with HOME=/
.. * MySQL Community Server 5.7.11 is startedWhat does that mean? Do I have to set a home directory to the user "mysql"? (and if so, what is the best choice? /home/mysql??) Now it's to /nonexistent:
mysql:x:110:106:MySQL Server,,,:/nonexistent:/bin/falsebut I have another machine with the same /nonexistent, and it doesn't show any error...
22 Answers
Having same issue to get rid of this error i did the following
Stop MYSQL service:
sudo service mysql stopChange home directory of mysql from nonexistent to original directory where it is supposed to be:
sudo usermod -d /var/lib/mysql/ mysql
Now start mysql server again with:
sudo service mysql startThe error message has disappeared. Still why this happen is unknown.
10I would furtrher suggest a permanent solution, if it always run from the same dir as I suppose it should why not edit the user mysql in /etc/passwd:
mysql:x:106:111:MySQL Server,,,:/var/lib/mysql/:/bin/false