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.
- 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.userandmysql.dbwithLIKE "username%". - Decide before deleting: back up and confirm nobody needs the old data.
In this guide
Find the conflict
- Log in to the server as root over SSH or WHM Terminal.
- Open the MySQL client:
mysql
- Select the system database:
use mysql;
- Check for conflicting users, replacing
usernamewith the cPanel username from the error:select User, Host from user where User like "username%";
- 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
Thank you for your message.