MySQL Permission denied error 13 and solution
MySQL ERROR 1018 (HY000): Can’t read dir of ‘./sakila/’ (errno: 13 – Permission denied) caused due to moving database to a different partition and using softlink on CentOS and it’s fix for SELinux.
Browsing Tag
3 responses to “MySQL Permission denied error 13 and solution”
Setting it to permissive is very quick, disabling/enabling takes too long and is not recommended for production. Also completely disabling requires system restart
Maybe it is better to restore SElinux settings, rather than completely disabling SElinux. For eg:
semanage fcontext -a -t mysqld_db_t “/var/lib/mysql(/.*)?”
restorecon -Rv /var/lib/mysql
That’s right; a good DBA with better systems skills :).
BTW In this case we will need to add the new partition /database/sakil though.
As I did not include SELinux settings change, I’ve added Oracle Blog at the end of the post which has that mentioned.
Thanks again Shahriyar,
Kedar.