Associate
Hi,
I am building a mysql server and have a second set of disks for the database data area. The disks are partitioned and mounted on the fs as /database.
I then followed one of the many guides on moving the data;
Now when trying to start I get the following in the log files;
I suspect that maybe selinux is causing issues again but am open to other suggestions.
What is the best way to resolve ?
Thanks
RB
I am building a mysql server and have a second set of disks for the database data area. The disks are partitioned and mounted on the fs as /database.
I then followed one of the many guides on moving the data;
Code:
service mysqld stop
cp -rv /var/lib/mysql /database
chown -R mysql:mysql/database
vi /etc/my.cnf
paste;
[mysqld]
user = mysql
datadir = /database/mysql
port = 3306
socket = /var/lib/mysql/mysql.sock
pid-file = /var/run/mysqld/mysqld.pid
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
:wq (save and exit)
service mysqld start
Now when trying to start I get the following in the log files;
120217 06:52:08 mysqld_safe Starting mysqld daemon with databases from /database/mysql
120217 6:52:08 [Warning] Can't create test file /database/mysql/localhost.lower-test
120217 6:52:08 [Warning] Can't create test file /database/mysql/localhost.lower-test
/usr/libexec/mysqld: Can't change dir to '/database/mysql/' (Errcode: 13)
120217 6:52:08 [ERROR] Aborting
120217 6:52:08 [Note] /usr/libexec/mysqld: Shutdown complete
120217 06:52:08 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
I suspect that maybe selinux is causing issues again but am open to other suggestions.
What is the best way to resolve ?
Thanks
RB