One of our customers was migrated from another cPanel host. While restoring his account to our cPanel server, we received the following error.
Account Restore Failed: “Account failure: Failed to create the account: A database owner with the name “cpaneluser” already exists.”
- Login to cPanel server via SSH with root privileges.
- Navigate to directory /var/cpanel/databases.
- Locate the file namely cpaneluser.json and cpaneluser.json.lock and move them to another folder.
- Try to restore cPanel account again. In several cases, moving cpaneluser.cache and cpaneluser.yaml files to some other folder also fixed the problem.
Note: Here cpaneluser is the symbolic cPanel user. While you follow above steps, you should look for the files with your actual cPanel username.
Facing an issue with cPanel update? Please refer to cPanel > Rebuild RPM for more details.