Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've recently configured a mysql 5.6 server on a centos 6.4 system. Everything was working fine. However, I exhausted the space on the root drive where /var/mysql is located. I then created a director /home/data and moved the database directory there from /var/lib/mysql. I changed the owner of the directory to mysql:mysql. I restarted the mysql server. I can no longer access the database from either mysql administrator or mysql workbench. The error is: Error fetch schema status. After some digging with log files, etc. I issued the I did the following:

mysql> use domains;
Database changed
mysql> show table status;
ERROR 1018 (HY000): Can't read dir of './domains/' (errno: 13 - Permission denied)

This is the permissions of the directory:

# ls /home -l
total 28
drwxr-xr-x. 2 mysql  mysql   4096 Mar 21 11:35 data

These are the permissions of the files in the data directory:

# ls -l domains/domain*
    -rw-r-----. 1 mysql mysql       8658 Mar 17 09:45 domains/domain.frm
    -rw-rw----. 1 mysql mysql 2375153244 Mar 21 11:54 domains/domain.MYD

This is the symbolic link:

lrwxrwxrwx. 1 root  root    11 Mar 21 12:29 domains -> /home/data/

I do not have --skip-symlinks set.

What now? Thanks, I appreciate any help.

share|improve this question
    
I suppose you changed the --datadir to reflect the new data path in my.cnf or the commandline ? –  ggiroux Mar 21 '13 at 19:05
    
@ggiroux I made the symbolic link in the /var/lib/mysql directory because there are other smaller databases there. I shouldn't have to change the data_dir since the data directory is still in the same place (/var/lib/mysql/) –  Michael Mar 21 '13 at 19:49
1  
what are the permissions like for all files under domains ? ERRNO 13 indicates some file(s)'s permission aren't alright still. show table status will try to open every file under domains/. –  ggiroux Mar 22 '13 at 0:58
    
@ggiroux everything is now -rwxrw-rw-., still same problem. –  Michael Mar 22 '13 at 13:52
    
do you have SELinux enabled? –  ggiroux Dec 10 '13 at 19:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.