Solved

Moving Data Dir

Posted on 2006-11-12
11
457 Views
Last Modified: 2008-02-01
I'm trying to move our datadir but everytime i try to start mysql's service it fails. the error is below. I have tried everyting, coping the dir as root then as mysql user and nothing work.  The /remote/d2 is a external mounted hard drive ( Dell PowerVault 220S ) Any ideas?

my.cnf---
[mysqld]
datadir=/remote/d2/mysql

---msyqld.log----
061112 11:30:03  mysqld started
061112 11:30:03 [Warning] Can't create test file /remote/d2/mysql/backup.lower-test
/usr/libexec/mysqld: Can't change dir to '/remote/d2/mysql/' (Errcode: 13)
061112 11:30:03 [ERROR] Aborting

061112 11:30:03 [Note] /usr/libexec/mysqld: Shutdown complete

061112 11:30:03  mysqld ended
0
Comment
Question by:ocsurf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 17925475
That certainly sounds like a simple permissions problem...

Copying the directory as the mysql user ought to do it, but you could try a chown -R mysql * just to be sure.

Which user did the mounting can potentially screw around with that too but if you're seeing that mysql owns everything then there must be more at work than meets the eye.
0
 
LVL 1

Author Comment

by:ocsurf
ID: 17925692
Yeap tried the chown -R mysql as well

its mounted with fstab
0
 
LVL 35

Expert Comment

by:Raynard7
ID: 17926418
what user are you starting mysql with?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 1

Author Comment

by:ocsurf
ID: 17926455
I'm running the mysqld service. This is for a web server.
0
 
LVL 35

Expert Comment

by:Raynard7
ID: 17926489
the mysqld service must run under a particular user, which user is that?
0
 
LVL 1

Author Comment

by:ocsurf
ID: 17927358
I assume root, how ever fedora 6 sets it up..I'll have to check
0
 
LVL 10

Expert Comment

by:mbvvsatish
ID: 17929175
try this

groupadd mysql
useradd -g mysql mysql
chown -R root  /usr/local/mysql
chown -R mysql /usr/local/mysql/data
chgrp -R mysql /usr/local/mysql
0
 
LVL 30

Expert Comment

by:todd_farmer
ID: 18017651
Can you start the mysql process with:

shell>  mysqld_safe &

?
0
 
LVL 1

Author Comment

by:ocsurf
ID: 18027241
Thanks for you help...but i found the answer.
if I set SELinux to permissive then every thing works. so i'm going to start playing with these settings.
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 18059321
Closed, 250 points refunded.
CetusMOD
Community Support Moderator
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question