Knowledgebase
Manage Databases Print this Article
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:
- The maximum length of the database name is 64 characters. However, due to the method that cPanel & WHM uses to store MySQL database names, each underscore character requires two characters of that limit. Therefore, if you enable database prefixing, the maximum length of the database name is 63 characters, which includes both the database prefix and the underscore character. Each additional underscore requires another two characters of that limit.
- 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, the process terminates 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 requires additional time to rename.
Databases
This 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:
- Click the pencil icon in the row that corresponds to the database.
-
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. -
Click Submit.
How cPanel & WHM renames a MySQL database
MySQL does not allow you to rename a database. When cPanel & WHM “renames” a database, the system performs the following steps:
- The system creates a new database.
- The system moves data from the old database to the new database.
- The system recreates grants and stored code in the new database.
- The system deletes the old database and its grants.
Warning:
- If any of the first three steps fail, the system returns an error and attempts to restore the database’s original state. If the restoration process fails, the API function’s error response describes 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 the rename action as a success; however, the API function returns warnings that describe the failure to delete the old database or grants.
Was this answer helpful?
Related Articles
Additional MySQL Access Hosts
Overview: This interface allows you to permit remote hosts (servers) to access MySQL® databases...
Overview: This interface allows you to permit remote hosts (servers) to access MySQL® databases...
Change MySQL User Password
Overview: This interface allows you to change a database user’s password. Because this feature...
Overview: This interface allows you to change a database user’s password. Because this feature...
Configure PostgreSQL
Overview: This interface allows you to complete the PostgreSQL® installation process, create...
Overview: This interface allows you to complete the PostgreSQL® installation process, create...
Database Map Tool
Overview: This feature allows server administrators to grant ownership of database objects...
Overview: This feature allows server administrators to grant ownership of database objects...
Manage Database Users
Overview This interface allows server administrators to retrieve a list of database users, each...
Overview This interface allows server administrators to retrieve a list of database users, each...