×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Massimo Zappino
Added: Nov 18, 2011 8:11 AM
Views: 152
A simple way to change the schema name
  1. mysqldump -u username -p -v olddatabase > olddbdump.sql
  2. mysqladmin -u username -p create newdatabase
  3. mysql -u username -p newdatabase < olddbdump.sql
  4.  
  5. # If you use a big database you can put the dump directly into new schema
  6. mysqladmin -u username -p create newdatabase
  7. mysqldump olddatabase -p | mysql -D newdatabase -p