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.

Database won't delete. DB Name is same as username.

Discussion in 'General Discussion' started by Gabbadude, May 3, 2008.

  1. Gabbadude

    Gabbadude Member

    Joined:
    Sep 13, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hey All,

    I was hoping someone could help me out.

    As a reseller, it is inevitable that we get uneducated users and sometimes they create a MySQL DB with the same name as their username. When this happens, there is NO way AT all to delete this database. Has anyone else ever experienced this problem? Is there a way to delete the database in any way without trashing the entire account???

    Please help.

    Gabbadude
     
    #1 Gabbadude, May 3, 2008
    Last edited: May 4, 2008
  2. ManojB

    ManojB Well-Known Member

    Joined:
    Mar 25, 2005
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    pune
    You cannot delete this database through your control panel, you have to delete this through ssh and for this you have to ask your hosting provider to do this.

    rm -rf /var/lib/mysql/username
     
  3. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    try using phpmyadmin as reseller.
    You might be able to delete them from there.

    I think there was a bug at one time where cpanel added an empty database on transfered accounts, or something like that.

    I found I was able to delete the empty databases from phpmyadmin, without any known issues.

    Notice that the db name is just acctname_ and not the normal acctname_dbname
     
  4. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    16
    ...............
     
    #4 carluk, May 3, 2008
    Last edited: May 4, 2008
  5. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    :eek: :eek: :eek:

    DANGER WILL ROBINSON, DANGER !!! DO NOT JUST RUN THIS AS PART OF THE PRIOR COMMANDS. THIS WILL KILL ALL DB'S.

    Many "newbies" tend to run all commands given, that line should have a BIG warning.
     
    #5 nyjimbo, May 4, 2008
    Last edited: May 4, 2008
  6. Gabbadude

    Gabbadude Member

    Joined:
    Sep 13, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Thanks guys for all the suggestions. I will take this to my hosting company :) and see what they say.
     
  7. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    16
    nyjimbo, it should only remove the databases with the name of the user not the user_database databases.
     
  8. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    16
    Oops indeed, I have just checked and the script didn't do what I thought it did, I cannot find the changelog entry where it listed the correct script to fix the cpanel user mysql db issue either.
     
  9. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Yes, I could be wrong but I think the script is a bit more dangerous, but I dont know the exact naming conventions and how its all stored in cpanels various database structures. Checking the user.MYD file and others it seems the users names are in there without the extended version.
     
  10. Gabbadude

    Gabbadude Member

    Joined:
    Sep 13, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Well, all I can say is that I took the problem to my hosting company and they did what was suggested here and now the databases are gone. So I don't know what they did but they did it based on the suggestions from this thread.

    Thanks guys! :)

    Regards
    Gabbadude
     
Loading...

Share This Page