cPanel Restore Failed: Unmanaged MySQL User Conflict

Last updated: 30 October 2026

When you restore a cPanel backup from WHM you may see: "Account Restore Failed: Failed to create the account: The system could not create the user ... because it conflicts with an unmanaged MySQL database user" (older versions say "a database owner with the name already exists"). cPanel says the conflict happens when an existing MySQL database or user has a name that starts with, or is identical to, the username being restored. This guide shows how to find the conflict and clear it safely.

Quick answer
  • Cause: a leftover MySQL user or database whose name starts with or matches the cPanel username, often from an account that was not removed cleanly.
  • Find it: query mysql.user and mysql.db with LIKE "username%".
  • Decide before deleting: back up and confirm nobody needs the old data.

In this guide

Find the conflict

  1. Log in to the server as root over SSH or WHM Terminal.
  2. Open the MySQL client:
    mysql
  3. Select the system database:
    use mysql;
  4. Check for conflicting users, replacing username with the cPanel username from the error:
    select User, Host from user where User like "username%";
  5. Check for conflicting databases and their users:
    select Host, Db, User from db where Db like "username%";

The percent sign matches similar names, so review every row.

Remove or rename it

A system or database administrator should decide whether the matching users and databases are still needed. Dumping a database before removal is the safe default:

mysqldump username_dbname > /root/username_dbname.sql

If the data is not needed, remove the stale user (and the database if confirmed unused):

DROP USER 'username'@'localhost';
FLUSH PRIVILEGES;

To keep a database, rename or export and re-import it under a name that does not start with the account username. Never drop databases that belong to other live accounts.

Restore again

Run the account restore from WHM again. If the same message returns, repeat the checks, because another prefix match may remain.

FAQ

Why does an account removal leave a MySQL user behind?

Interrupted removals or manual database changes can leave users and databases that cPanel no longer manages.

Is it safe to drop the user?

Only after you confirm no live site uses it and you have a backup.

Does this apply to remote MySQL?

The same conflict can occur with remote database servers. Run the queries on the server that hosts the databases.

Sources

More on this site: Security guides · All IT guides

Comments