Bug #65413 | /usr/libexec/mysqld: Can't change dir (Errcode: 13) | ||
---|---|---|---|
Submitted: | 24 May 2012 15:16 | Modified: | 30 May 2012 11:55 |
Reporter: | Anton Logvinenko | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Installing | Severity: | S1 (Critical) |
Version: | 5.1.61 | OS: | Linux (CentOS release 6.2 (Final)) |
Assigned to: | CPU Architecture: | Any | |
Tags: | CentOS, linux, mysqld |
[24 May 2012 15:16]
Anton Logvinenko
[24 May 2012 15:46]
Valeriy Kravchuk
If after this step: 2. copy database files to /media/sda3/mysql cp /var/lib/mysql /media/sda3/ you really did this: 3. change permissions to files chown mysql:mysql /var/lib/mysql/ -R then owner of /media/sda3/mysql is probably still NOT mysql:mysql and error 13 is expected... Please, double check.
[24 May 2012 15:56]
Anton Logvinenko
sorry, it's copy-paste mistake actually i did this: chown mysql:mysql /media/sda3/mysql -R by the way, when i do this: su mysql cd /media/sda3/mysql mkdir somedir somedir successfully created
[25 May 2012 5:54]
Valeriy Kravchuk
Looks like it may have something to do with SELinux then. See bug #41422 as yet another example. Please, try to start with SELinux disabled and check if this changes anything.
[25 May 2012 14:20]
Anton Logvinenko
i think i found the solution of this problem i create default mysql dir /var/lib/mysql then give to dir right permissions some changes to my.cnf [mysqld] datadir=/media/sda3/mysql socket=/media/sda3/mysql/mysql.sock log-bin=/media/sda3/mysql/mysql-bin /etc/init.d/mysqd start Starting mysqld: [ OK ] but what in the default mysql dir ? ls /var/lib/mysql mysql-bin.000001 mysql-bin.index why? i think the problem with the Binary Log path
[30 May 2012 11:49]
Sveta Smirnova
Thank you for the feedback. > but what in the default mysql dir ? > > ls /var/lib/mysql > mysql-bin.000001 mysql-bin.index These can be files created earlier than you changed datadir. To ensure please send full configuration file and output of `ls -l /media/sda3/mysql`
[30 May 2012 11:55]
Anton Logvinenko
The problem resolved. I found duplicate records of log-bin path in config with different paths. Thanks a lot!