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

MySQL does not natively rename databases. 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. 


  • 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 function's error message will include the additional failures.
  • In rare cases, the system creates the new database successfully, but fails to complete step 4. The system treats this as a success, but the function will return warning messages that describe the failure.
  • No labels