Re: Procrss to move a database directory
Posted by: Hsing-Tsu Lai
Date: August 05, 2006 08:11AM

If you are using innodb engine for at least one table, you will have need mysqldump because the paths to its table space files can't be moved without export/import. you could use sym-links as a short-term solution.

The steps are like this:
1. restrict application or other users' access, by changing max_connection to 0
2. if using innodb, backing up the databases with mysqldump (with --opt).
3. shutdown mysqld
4. update my.cnf
5. if using innodb, copy the database directory and files for the database "mysql" to the new directory. start up mysqld and then import the rest of data.
if not using innodb, copy all database directories and files to the new location, before restarting the mysqld.
6. check error log
7. test.

Options: ReplyQuote


Subject
Written By
Posted
Re: Procrss to move a database directory
August 05, 2006 08:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.