Solved

Moving Data Dir

Posted on 2006-11-12
11
449 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying 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

I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 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