Posted By

minipark on 11/26/10


Tagged


Versions (?)

Rename MySQL Database


 / Published in: Bash
 

  1. cd /var/lib/mysql/
  2. /etc/init.d/mysql stop
  3. # rename database...
  4. mv olddbname newdbname
  5. # ...or table
  6. cd database/
  7. mv oldname.frm newname.frm
  8. mv oldname.MYD newname.MYD
  9. mv oldname.MYI newname.MYI
  10. /etc/init.d/mysql start

Report this snippet  

You need to login to post a comment.