How to restore database from /var/lib/mysql
you need to make sure the ownership and privileges are correct for the directory, you can use the following commands to set it right:

chown -R mysql:mysql /var/lib/mysql/ --your mysql user may have different name, if its different you need to change it [mysql:mysql] as needed 
chmod -R 755 /var/lib/mysql/


note: -R: recursive fir the directory and all its contents.