472,101 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,101 software developers and data experts.

Change datadir in my.cnf

Hi,

I would like to move my DBs in another directory.
I know that I have to change in my.cnf the datadir path ....

[mysqld]
datadir=/var/lib/mysql

-datadir=/user/mysql/databases

now my question is, can I simple copy all my DBs to the new datadir,
and then restart mysql server ?
Or is there something to take care ?
Thanks a lot
JP

Jan 30 '07 #1
1 23288
po*******@warpstudio.ch wrote:
Hi,

I would like to move my DBs in another directory.
I know that I have to change in my.cnf the datadir path ....

[mysqld]
datadir=/var/lib/mysql

-datadir=/user/mysql/databases

now my question is, can I simple copy all my DBs to the new datadir,
and then restart mysql server ?
Or is there something to take care ?
Thanks a lot
JP
It's pretty straightforward, the big thing is to make sure permissions
are set appropriately in the new location. Here's one of many
walk-throughs:

http://rajshekhar.net/blog/archives/...irectory..html
Jan 30 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Nils Valentin | last post: by
2 posts views Thread by Tony Baker | last post: by
4 posts views Thread by J.C. Flores | last post: by
1 post views Thread by Spike | last post: by
5 posts views Thread by Hank | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.