Solved

Moving Data Dir

Posted on 2006-11-12
11
452 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
Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 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