Wednesday, January 18, 2012

Safely rename a database command

 shell> mysqladmin -u root -pXXXX create spm_new
shell> mysqldump -u root -pXXXXX SPM
| mysql -u root -pXXXX spm_new &
 first, create the new database (with no tables)
 secondly, use mysqldump to dump from the original database to the new db. if you connect remotely into the server. Please do allow the mysqldump process to run in background by adding  "&" 
 

No comments:

Post a Comment