LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   mysql data directory on luks encryted volume fails to start the service (https://www.linuxquestions.org/questions/linux-server-73/mysql-data-directory-on-luks-encryted-volume-fails-to-start-the-service-4175533345/)

zafar_dandoti 02-07-2015 09:44 AM

mysql data directory on luks encryted volume fails to start the service
 
Hello everyone.
I have hard luck searching...

After changing default directory of mysql it fails to start.
This is what i have done so far
Created a directory /data/mysql
Copied contents of /var/lib/mysql to /data/mysql
Changed the owner and group owner to mysql for dir /data/mysql
Set selinux context as chcon -t mysqld_connect_db_t /data/mysql
Changed /etc/my.cnf pointed to new data directory startrd the deamon service mysqld start
Its says failed.
When i cheked the log in /var/log/mysqld.log
It says cant create test file /data/mysql/localhost.lower.test
i have verified the directory is owned by mysql and permition set to 775.
Any idea whats wrong in this setup

Distro =centos 6.x 64bit
Mysql =mysql 5.1.x
Selinux =enforcing
/data directory mounted on luks encrypted volume /dev/sda7
Reason for changing default directory
/var only 2.2 gb remaining.

littleball 02-10-2015 11:26 AM

Have you tried

$ su - mysql; touch /data/mysql/example.file

Are you able to read+write into path using mysql user? or root user?.

zafar_dandoti 02-11-2015 11:44 AM

Thank littleball.
Yes both users can write to that directory.
I have read some post on LQ and other that creating a symlink to the default directory is the only solution. Just pointing to new directory in my.cnf wont work. I shall give it try and return. Thanks


All times are GMT -5. The time now is 05:16 AM.