Question
I changed the permissions or ownership of /var/lib/mysql
- what should they be?
Answer
The MySQL data-directory ownership should not be changed, but if MySQL is not starting on your server, the correct ownership of the directory is mysql:mysql, and the permissions of the directory should be 0751.
To set these, run the following commands as root via SSH or WHM terminal:
chmod -v 0751 /var/lib/mysql
chown -v mysql:mysql /var/lib/mysql
Note that the files in the /var/lib/mysql
directory and its subdirectories should all also be owned by the mysql user and group.