Home » WHM/cPanel » Sorry, a mysql user with the name “username” already exists.

Sorry, a mysql user with the name “username” already exists.

Sorry, a mysql user with the name “username” already exists.
If your are getting the error as “Sorry, a mysql user with the name “username” already exists”, While creating, restoring new account in WHM.
To resolve the issue follow the below steps.
1. Check for entries of that usernames in the following files and if there is any, remove those entries.

/var/cpanel/databases/*
/var/cpanel/databases/users.db
/etc/dbowners

# grep username /var/cpanel/databases/*

If that user is already showing up in above files, it will prevent the account from restoring and creating.
So we have to remove these entries.
2. Verify the /etc/passwd, /etc/group, /etc/shadow files as well as for the same.

#userdel -f username.

3. Moreover verify the mysql database that user exists or not.

mysql> use mysql;
mysql> select User, Host from user where User like ‘username’;

About

I am founder and webmaster of www.linuxpcfix.com and working as a Sr. Linux Administrator (Expertise on Linux/Unix & Cloud Server) and have been in the industry from last 7 years.

One thought on “Sorry, a mysql user with the name “username” already exists.

  1. katrinerskine says:

    I pay a quick visit every day a few web pages and blogs to read posts,
    except this weblog offers quality based posts.

Leave a Reply

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

*
*

Time limit is exhausted. Please reload the CAPTCHA.

Categorized Tag Cloud