Page tree
Skip to end of metadata
Go to start of metadata

This document is for a previous release of cPanel & WHM. To view our latest documentation, visit our Home page.

For cPanel & WHM 11.44

(Home >> SQL Services >> Manage Databases)

Overview

This interface allows you to list cPanel-managed databases on your server, each database's engine, and which user owns each database. You can also use this interface to rename databases.

Warning

  • It is potentially dangerous to rename a MySQL® database. We strongly recommend that you create a backup of a MySQL database that you wish to rename.
  • If you rename a database, this will terminate all active connections to the database.
  • You must manually update configuration files and applications to use the new database name.
  • Larger and more complex databases will take longer to rename.

Databases

The Databases section of the interface provides a table that lists all of the databases on the server.

Click each column heading to sort the list by that column. Search for a particular database with the Search text box.

Rename a database

To rename a database, perform the following steps:

  1. Click Rename in the row that corresponds to the database.
  2. In the Rename to text box, enter the new name for the database.

    Warning

    If database prefixing is enabled, this parameter must include the database prefix for the account.

  3. Click Submit.

How cPanel & WHM renames a MySQL database

MySQL does not natively allow you to rename a database. When cPanel & WHM "renames" a database, the system performs the following steps:
  1. The system creates a new database.
  2. The system moves data from the old database to the new database.
  3. The system recreates grants and stored code in the new database.
  4. The system deletes the old database and its grants.

Warning:

  • If any of the first three steps fail, the system will return an error and attempt to restore the database's original state. If the restoration process fails, the API call’s error response will also describe these additional failures.
  • In rare cases, the system creates the second database successfully, but fails to delete the old database or grants. The system treats this as a success; however, the API call will return warnings that describe the failure to delete the old database or grants.

  • No labels