You need to set ownership and permissions for directory:
chown -R mysql:mysql /var/lib/mysql/
#your mysql user may have different name
chmod -R 755 /var/lib/mysql/
Note: -R makes commands recursive – you may omit it, if there is no subdirs in /var/lib/mysql/.