Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Moving Data Dir

Posted on 2006-11-12
11
Medium Priority
?
468 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
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
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

916 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