Base de connaissances
How to rename a database in cPanel? Imprimer cet article
Rename a database
Warning:
- It is potentially dangerous to rename a MySQL database. We strongly recommend that you perform a backup of the MySQL database in cPanel’s Backup interface (cPanel >> Home >> Files >> Backup) before you attempt to rename it.
- When you rename a database, the system terminates all active connections to the database.
- You must manually update configuration files and applications to use the new database name.
- The system requires more time to rename larger and more complex databases.
To rename a database, perform the following steps:
- In the Current Databases table, click Rename for the desired database.
- Enter the new database name in the New name text box.
- Click Proceed.
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.
Cette réponse était-elle pertinente?
Articles connexes
How to import database via phpMyAdmin in cPanel?
1. Log into your cPanel account.2. In the "Databases" section, click on "phpMyAdmin" Icon. 3. In...
1. Log into your cPanel account.2. In the "Databases" section, click on "phpMyAdmin" Icon. 3. In...
How to edit database table via phpMyAdmin in cPanel?
1. Log into your cPanel account.2. In the "Databases" section, click on "phpMyAdmin" Icon. 3. In...
1. Log into your cPanel account.2. In the "Databases" section, click on "phpMyAdmin" Icon. 3. In...
How to delete database table via phpMyAdmin in cPanel?
1. Log into your cPanel account.2. In the "Databases" section, click on "phpMyAdmin" Icon. 3. In...
1. Log into your cPanel account.2. In the "Databases" section, click on "phpMyAdmin" Icon. 3. In...
How to optimize database via phpMyAdmin in cPanel?
1. Log into your cPanel account.2. In the "Databases" section, click on "phpMyAdmin" Icon. 3. In...
1. Log into your cPanel account.2. In the "Databases" section, click on "phpMyAdmin" Icon. 3. In...
How to Repair database via phpMyAdmin in cPanel?
1. Log into your cPanel account.2. In the "Databases" section, click on "phpMyAdmin" Icon. 3. In...
1. Log into your cPanel account.2. In the "Databases" section, click on "phpMyAdmin" Icon. 3. In...