No announcement yet.

How can I change 'dbname' of an existing database?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I change 'dbname' of an existing database?

    I'd like to change the name of my existing database, say, from "old_vbdb" to "new_vbdb".

    Any easy way to do this and maintain the integrity and all of the data in the database?

  • #2
    MySQL does not support the rename of a database through its command interface at the moment, but you can rename the database if you have access to the directory in which MySQL stores its databases. For default MySQL installations this is usually in the Data directory under the directory where MySQL was installed. Locate the name of the database you want to rename under the Data directory and rename it.

    Note: You must stop MySQL before you can rename the database
    TechArena - TechArena Community - News - Download - Video - Guide - Review


    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.