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.

Is there a way to undo access host from all the Mysql users/db?

Discussion in 'General Discussion' started by silversurfer, Apr 24, 2004.

  1. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    Hi

    The other day, I added an access host from WHM and apply it to all my databases using WHM. (/scripts2/mysqlupdateall) and it was added.

    Now, I wish to remove them. How do I do it without having to login to every cPanel and manually removing it?

    I tried deleting it from WHM, saving it, and applying the mysql update script. But the access host remains. Thanks.
     
  2. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    I don't know of a script for this job but here's what I did when I had a similar problem.

    In WHM Mysql/phpMyAdmin/ you will see all your dbs in there.
    Select the mysql db which on mine has 6 tables (6).
    Select 'Go' till the 6 tables are diaplayed in the left frame.
    Select db then browse and you should see a column marked host with your errant host showing.
    Just tick each instance then hit the garbage can.
    They should be gone.
    Check through the other tables to see if there are any other items you want to clean up.

    I had to do a similar thing the other day as for some reason cPanel would not delete old users etc., including hosts that had travelled from by previous hosting company, from this main db.
    I have a lean and clean mysql data base now.
    HTH.
     
  3. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    Hi

    I don't see what you are referring to. Also that is not much different from going into every account and deleting it. There ought to be a way to remove it easily.
     
  4. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    It took me about 5 mins to find and delete over 640 errant entries in the main mysql db. I checked a couple of clients cPanel dbs to see if the errant host entries had indeed been removed and yes they had all gone. Its like having a master phpmyadmin at your finger tips with no need to travel the clients panels at all.
    I take it you are the server owner and not a reseller.

    Other than that I don't know of a script that will do the trick, sorry. Perhaps in time someone will come up with a 10 second solution. I will be interested so will keep my eye on this thread.
     
  5. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    Ah ok. I see it now! Thanks.
     
  6. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    Ok. I got something even better....

    Instead of selecting them one by one, you can click on "SQL" tab and run this

    DELETE FROM `db` WHERE `Host` = 'host.tobedelete.com'
     
  7. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    Good solution and I am pleased it all worked out for you. Sql is not my strong suit, thats why I rely on these little check boxes and icons to get me through. :)
     
Loading...

Share This Page