Home » MySQL

MySQL – rename a database

30 December 2008 No Comment

I looked through the documentation on MySQL and it looks like they removed the “rename database” option. Here’s a workaround:

mysqladmin create [Name of new database]
mysqldump –opt [Name of old database] | mysql [Name of new database]

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

*