Here s what you need to do:
1. Use mysqldump to dump old mysql database.
2. Create new database using mysqladmin.
3. And run the sql generated via mysqldump.
e.g. if you want to change database named "school_old" to "school_new"
Here are the commands.
mysqldump -u username -p -v school_old > old_db_dump.sql
mysqladmin -u username -p create school_new
mysql -u username -p school_new < old_db_dump.sql
No comments:
Post a Comment