Database 快速改名
Use these few simple commands:mysqldump -u username -p -v --routines olddatabase > olddbdump.sql
mysqladmin -u username -p create newdatabase
mysql -u username -p newdatabase < olddbdump.sql
Or to reduce I/O use the following as suggested by @Pablo Marin-Garcia:
mysqladmin -u username -p create newdatabase
mysqldump -u username -v --routines olddatabase -p | mysql -u username -p -D newdatabase
Reference: https://stackoverflow.com/questions/67093/how-do-i-quickly-rename-a-mysql-database-change-schema-name
頁:
[1]