Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

default mysql database - how delete ?

Discussion in 'General Discussion' started by webstyler, May 20, 2008.

  1. webstyler

    webstyler Well-Known Member

    Joined:
    Nov 20, 2003
    Messages:
    439
    Likes Received:
    0
    Trophy Points:
    166
    Hello

    under cpanel there is always a database with the name of Cpanel username

    .. but is not possible to give user privilege for this db or to delete this db ??

    How fix this ?

    tx
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,563
    Likes Received:
    42
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    /scripts/mysqldeluserdb
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. webstyler

    webstyler Well-Known Member

    Joined:
    Nov 20, 2003
    Messages:
    439
    Likes Received:
    0
    Trophy Points:
    166
    :) TX

    But.. this delete delete default database of all server customer, right ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,563
    Likes Received:
    42
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    No. It only deletes for the user you stipulate on the command line.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. webstyler

    webstyler Well-Known Member

    Joined:
    Nov 20, 2003
    Messages:
    439
    Likes Received:
    0
    Trophy Points:
    166
    uhm.. thx

    For any customer I see 1 db with name = username + other db that is username_namegivefromuser

    I need to delete only db that any customer have on account that is naned as username

    So, I can also make same operation throught WHM > phpmyadmin and delete it ..

    Right ?


    Tx for help
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Vision

    Vision Active Member

    Joined:
    Mar 18, 2002
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    306
    cPanel Access Level:
    Root Administrator
    This command will delete all the users empty databases.
    for u in `ls -C1 /var/cpanel/users`; do /scripts/mysqldeluserdb $u; done

    I tried it in a few servers and works fine. I had a couple of problems with clients who were using as dbuser only username instead of username_user.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice