|
|
|
|
|
|
| Author |
Message |
dignix *nix forums beginner
Joined: 07 Mar 2005
Posts: 1
|
Posted: Tue Mar 08, 2005 6:08 pm Post subject:
move databases
|
|
|
|
I need to move mysql databases to a different partition. Can anyone tell me what I could do to move all the databases to /mnt/hda7. |
|
| Back to top |
|
 |
mihai *nix forums addict
Joined: 27 Jan 2005
Posts: 71
|
Posted: Wed Mar 09, 2005 11:04 am Post subject:
|
|
|
first stop your mysql server, then just move all the files in /var/lib/mysql ( or whatever the default datadir is on your system ) to /mnt/hda7
| Code: |
mv /var/lib/mysql /mnt/hda7
chown -R mysql:mysql /mnt/hda7/mysql
|
the chown is to make sure the new dir is owned by mysql.
Next you have to edit my.cnf and under the [mysqld] section you will have to add
datadir=/mnt/hda7/mysql
and start mysqld |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Wed Dec 03, 2008 1:25 am | All times are GMT
|
|
Mortgages | Shares | Secured Loans | Ken follet | Free Myspace Layouts
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|