Change datadir in my.cnf
am 30.01.2007 10:29:51 von pontarolo
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
Re: Change datadir in my.cnf
am 30.01.2007 14:24:30 von Carl Pearson
pontarolo@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/90-Moving-the-MySQLs-dat adir-directory..html