LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-07-2015, 09:44 AM   #1
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
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.

Last edited by zafar_dandoti; 02-07-2015 at 12:46 PM.
 
Old 02-10-2015, 11:26 AM   #2
littleball
Member
 
Registered: Jan 2011
Distribution: Slackware, Red Hat Enterprise
Posts: 47

Rep: Reputation: 8
Have you tried

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

Are you able to read+write into path using mysql user? or root user?.
 
Old 02-11-2015, 11:44 AM   #3
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Original Poster
Rep: Reputation: 13
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

Last edited by zafar_dandoti; 02-11-2015 at 11:46 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving MySql data folder - can't start service after move. Spaz007 Linux - Software 3 07-28-2014 06:16 PM
WD MyBook Live Duo - Raid 0 fails to mount data volume (can't find superblocks) gilsonsjc Linux - Hardware 3 06-08-2014 04:17 PM
smb service start fails SriniKlr Linux - Newbie 4 06-10-2011 10:49 PM
Problem changing mysql uid,gid: mysql start fails gjatute Linux - Newbie 7 02-25-2010 01:38 AM
cups Printing Service Fails to Start Harry Seldon Linux - Software 2 09-01-2005 04:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration