root@localhost mohit]# tail -n 20 /var/log/mysqld.log
110417 18:37:45 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110417 18:37:45 InnoDB: Initializing buffer pool, size = 8.0M
110417 18:37:45 InnoDB: Completed initialization of buffer pool
110417 18:37:45 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
110417 18:37:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
110417 18:54:00 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110417 18:54:00 InnoDB: Initializing buffer pool, size = 8.0M
110417 18:54:00 InnoDB: Completed initialization of buffer pool
110417 18:54:00 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
110417 18:54:00 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
I think this is SELinux problem.
You can turn selinux off. but this is security application and turning it off is not recommended if you are running fedora on server.
you can turn off selinux by changing /etc/selinux/config file
I have the same problem. I installed Fedora 14. Then I added a new disk and changed the MySQL data directory in my.cnf to point to a folder on this new disk.
I started getting SELinux error messages, which by following the help in those messages I managed to resolve.
But now after a reboot MySQL fails to start, it is something to do with SELinux.
Does documentation exist about how to resolve these errors?
Basically I need to know:
All the steps needed to successfully change the data directory for MySQL, including setting permissions, SELinux commands etc.