The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sorry, a mysql user with the name x already exists.

Discussion in 'Database Discussions' started by Razakel, Nov 9, 2010.

  1. Razakel

    Razakel Registered

    Joined:
    Nov 9, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I reinstalled my server and imported an SQL dump, then removed all the MySQL users. Now when I try to recreate an account I get the error:

    Sorry, a mysql user with the name x already exists.

    despite it not existing.

    I'm guessing users are cached somewhere, anyone know where?
     
  2. activa

    activa Well-Known Member

    Joined:
    May 23, 2006
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    the same error here .

    the user is for a old account was already removed .

    i have tried to remove it by command and it fail !!!

    Code:
    DROP USER xxx ;
    ERROR 1396 (HY000): Operation DROP USER failed for xxxx;
     
  3. activa

    activa Well-Known Member

    Joined:
    May 23, 2006
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    resolved by the command

    Code:
    drop user 'xxxxx'@'localhost';
    first you should enter mysql .

    i hope this will be helpfull .
     
  4. hekri

    hekri Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    149
    Likes Received:
    2
    Trophy Points:
    18
    the same problem, any one from cpanel cat fix it?


    The same problem o 12 dedicated servers when we termitate accout and want to create account with the same username
     
  5. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    We ask that anyone experiencing this problem please submit a ticket so that we may log into your server and investigate this directly. If there is a bug in the product that is causing this to happen, we need to see affected servers so that we can isolate and identify the bug and fix it.
     
  6. hekri

    hekri Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    149
    Likes Received:
    2
    Trophy Points:
    18
    What for you need login data to the server? Test in on your local server.


    We have the same situation on all 12 dedicated servers Centos 5 (32 and 64bit)

    Example acount abc

    Terminate acount abc
    Create account abc

    Account creavtion failed!
    Sorry, a mysql user with the name abc already exists.
     
  7. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I have not been able to duplicate this on a test server. It is important to recognize that production servers can have very different environments, and this can make duplicating your exact situation on one of our test servers difficult or impossible. We do not take lightly the request for log-in information, and all log-in information is handled in a secure manner, and all access to customers' servers is done using secure methods.
     
  8. Cindu

    Cindu Well-Known Member

    Joined:
    Feb 7, 2011
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hey!!:rolleyes:

    Thumbs up to cPanel Techs! There is nothing harm in giving them login informations. You will get a faster solution if you give them that! ( My personal experience)
     
  9. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    @hekri
    How quickly are you deleting and recreating the cPanel account? When you delete an account, some parts of the deletion process (which include MySQL drop/revoke/flush stuff) are send to a queue for processing. That is, those processes don't happen instantaneously along with the WHM interface (or API request). So, when you delete an account, the cPanel database index is queue for updating...but when you attempt to recreate the account before the index has time to be rebuilt (remember it's in a process queue), you'll receive that error. Usually, a simple delay (10-30secs) between deletion and creation preempt this error.

    But like Jared said, there are many things at play here and we recommend opening a support ticket so we can investigate the problem within you specific environment.

    Regards,
    -DavidN
     
  10. Xavior82

    Xavior82 Active Member
    PartnerNOC

    Joined:
    Oct 5, 2006
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Montreal
    One of my reseller clients just reported this same problem (and I confirmed) on v11.28.86, so you guys may want to look into some mechanism for preventing this in the future...
     
  11. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    As requested previously in this thread, if you are experiencing this issue, please submit a ticket using either WHM > Support Center > Contact cPanel or the link in my signature. Please post the ticket number here upon opening one.
     
  12. cesarlwh

    cesarlwh Well-Known Member

    Joined:
    Sep 23, 2008
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    To fix:
    /scripts/updateuserdatacache
     
  13. garconcn

    garconcn Well-Known Member

    Joined:
    Oct 29, 2009
    Messages:
    98
    Likes Received:
    1
    Trophy Points:
    8
    This does not work for me.
     
  14. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Have you opened up a ticket about the issue? If the proposed suggestions in this thread do not resolve the issue, the course of action requested is to open up a ticket.
     
  15. xisn

    xisn Well-Known Member

    Joined:
    Dec 4, 2004
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I know this is a bit of an old thread however I am experiencing the same issue here... In addition to this error, the users see no databases when clicking the "MySQL Databases" link.

    I also tried to run the command "/scripts/updateuserdatacache" which also did not resolve this issue for me either.

    Ticket #: 1630138
     
    #15 xisn, Jun 15, 2011
    Last edited: Jun 15, 2011
  16. CyberFunk

    CyberFunk Registered

    Joined:
    Jun 26, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Log into your webserver as root and run:
    grep -Rl USERNAME /var/cpanel/databases/

    You will get a list of files where needed username is still placed.:)
     
    #16 CyberFunk, Jul 11, 2011
    Last edited: Jul 11, 2011
  17. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    I just ran across this issue once again. I had a cpanel ticket previously for this, where I was informed this would be fixed in 11.30; however, I am running 11.30.4 and still have the issue.

    This is a long time for such an issue.

    Any updates to report?

    Thanks.

    Mike
     
  18. PvUtrix

    PvUtrix Well-Known Member

    Joined:
    Mar 12, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Ekaterinburg - Russia
    cPanel Access Level:
    Root Administrator
    I've come across the same problem

    running grep -Rl combat /var/cpanel/databases/

    shows 2 results
    /var/cpanel/databases/users.db.cache
    /var/cpanel/databases/users.db


    How can I remove the user from there?

    I've tried running /usr/local/cpanel/bin/setupdbmap

    and checked /var/cpanel/databases no user or related DBs there
     
    #18 PvUtrix, Jan 27, 2012
    Last edited: Jan 27, 2012
  19. hoststop

    hoststop Well-Known Member

    Joined:
    Dec 6, 2011
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Bolton, UK
    cPanel Access Level:
    Root Administrator
    If running the commands you mentioned does not solves the problem a work around is to remove the entries from cache files manually. This work around worked for me
     
  20. PvUtrix

    PvUtrix Well-Known Member

    Joined:
    Mar 12, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Ekaterinburg - Russia
    cPanel Access Level:
    Root Administrator
    just removed the mentioned user manually from /var/cpanel/databases/users.db.cache and /var/cpanel/databases/users.db
    That did the trick, thx hoststop!
     
Loading...

Share This Page