469,286 Members | 2,422 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,286 developers. It's quick & easy.

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 22985
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.