Economicalhost · Knowledge Base
Knowledge Base › Databases › How to Rename a MySQL Database
Databases

How to Rename a MySQL Database

cPanel includes a database rename tool. Remember that renaming changes what your application must connect to, so update its config afterwards.

Step-by-step

  1. Back up the database first via export.
  2. Open Databases → MySQL Databases in cPanel.
  3. Find the database under "Current Databases" and click the Rename action next to it.
  4. Enter the new name (your account prefix is kept) and confirm.
  5. Update your application config with the new database name — for WordPress, edit DB_NAME in wp-config.php.
  6. Reload the site and confirm it connects; if not, re-check the config name and the user's access (see connection errors).

💡 Good to know

  • The connected user keeps its access through a rename, but the app config must still be updated.
  • Renaming on a live site causes brief downtime until the config is updated — do it during quiet hours.
  • Always note the exact new name including the youruser_ prefix.