PDA

View Full Version : Rename Database: Possible?


cdolson
9-14-06, 12:52 AM
I've tried numerous times to rename some of my Powweb MySQL databases, but am always denied the ability.

Is this feature disabled, or am I doing something wrong?

I did some forum searching and found some people who seemed to be able to do this, and recommended doing so to some people for certain scenarios, but I can't seem to.

Thanks,

cdolson

Croc Hunter
9-14-06, 02:14 AM
You can in phpMyAdmin under the "Operations" tab.
OPS> Services> MySQL> Administer. (login to phpMyAdmin)
Click your dbname on the far left> Operations> change the db name.

Or you can make a backup of your database in OPS. Then create your newly named database and import your backup. Make sure it works. Then 'Drop' the old database and delete it.

If the database is empty just create your new one and drop the old.
If something like phpBB is using the db you'll need to change the dbname in your config file too.

justinr
9-15-06, 03:38 PM
You can't actually rename the database, that functionality is not available. Your only option is to recreate the database and copy over the DB dump.

Croc Hunter
9-16-06, 10:30 AM
Ah.. I knew phpMyAdmin was capable of changing dbname as above.
I hadn't actually tried it here at Powweb. Thanks for the clarity justinr.