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.

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:
    432
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    /scripts/mysqldeluserdb
     
  3. webstyler

    webstyler Well-Known Member

    Joined:
    Nov 20, 2003
    Messages:
    432
    Likes Received:
    0
    Trophy Points:
    16
    :) TX

    But.. this delete delete default database of all server customer, right ?
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    No. It only deletes for the user you stipulate on the command line.
     
  5. webstyler

    webstyler Well-Known Member

    Joined:
    Nov 20, 2003
    Messages:
    432
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  6. Vision

    Vision Active Member

    Joined:
    Mar 18, 2002
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    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