I recently changed the permission of mysql, /var/lib/mysql so I could save a database in it manually (was only option currently, instead of importing it the proper way). To do so, I had to change the permissions from username: MySQL Server and group: mysql. When I tried to change it back I got this error: chown: invalid user: ‘MySQL’... Where to now?
2 Answers
The username is probably mysql, not "MySQL Server" or "MySQL". Remember, everything in Linux is case sensitive.
You can also find out the exact username by running grep -i mysql /etc/passwd and take a look at the first word, that's the username.
Try this to set back the permission:
sudo chown mysql:mysql /var/lib/mysqlYou can check if the mysql user is available on your system with the command:
id mysqlit should response something like this:
uid=107(mysql) gid=111(mysql) groups=111(mysql) 4