How to rename a database...?

[expired user #1919]'s profile image [expired user #1919] posted 16 years ago in General Permalink
I can rename databases in PHPMyAdmin, Navicat and other MySQL apps, but not in HeidiSQL,
I have searched but can't find how to rename a database using Heidi.
Is it a command line that I run in the Query window?

RENAME {DATABASE | SCHEMA} db_name TO new_db_name;


Is this the only way?

Cheers
ansgar's profile image ansgar posted 16 years ago Permalink
If the server supports it, you have a menu item available when rightclicking in the DB tree: "Alter database". There you can rename and change characterset and collation:


Renaming is supported since MySQL 5.1.7 .
1 attachment(s):
  • alterdatabase
[expired user #1919]'s profile image [expired user #1919] posted 16 years ago Permalink
I have version 5.0.45
Will have to upgrade as mine is grayed out for renaming the phyisical database.

Cool thanks.

Cheers
-PSi-'s profile image -PSi- posted 4 years ago Permalink

...and at least from ver 10.0.0 it is disguised as "Edit...". I wonder why F2 could not rename the selected database...

pekka

ansgar's profile image ansgar posted 4 years ago Permalink

Wow, a 12 years old thread!

Indeed, that "Edit.." contect menu is the only way to rename a database. As renaming a database can have quite dramatic consequences, F2 is intentionally not supported, due to probably accidentally clicks.

Please login to leave a reply, or register at first.