Account Creation Status: failed Sorry, a mysql user with the name xxxx already exists

Recently i wanted to terminate one of customer’s account and restore once again. So i used

/scripts/killacct

After terminating the account, in order to restore i used following script.

/scripts/restorepkg

But the script halted during the process with following error on the screen.


Account Creation Status: failed Sorry, a mysql user with the name xxxx already exists

The error clearly means that the account was not terminate properly and I would need to find out what entry remained in the server that resulting in the error.

After a bit of research I found an user entry in following files.

/var/cpanel/databases/users.db

/etc/dbowners

After removing these entries, execute the following command.

userdel -f username

It worked and I could successfully restore user using the script.

Leave a Reply

Your email address will not be published. Required fields are marked *