echo "create database new_database;" | mysql -u <username> -p <enter password>
mysqldump --user=<name> --password=<password> <old_database> | mysql -D new_database -p <enter password>
Now you can drop the old database ( after making sure you have all the contents on the new database). Ofcourse you need to recreate the user permissions for the new database.
No comments:
Post a Comment