Results 1 to 8 of 8

Thread: 'Additional MySQL Access Hosts' issue

  1. #1
    Member Indianets's Avatar
    Join Date
    Jun 2008
    Posts
    62
    cPanel/WHM Access Level

    Root Administrator

    Question 'Additional MySQL Access Hosts' issue

    Hello,

    I added an IP (say 1.2.3.4) on a server in WHM > Additional MySQL Access Hosts.

    And added it to all cPanels by clicking --- "After you have done this, if you would like to configure access from all users' accounts, Click Here.". I could see 1.2.3.4 was added under all cPanels of the server under 'Remote MySQL Hosts'.

    Now I want to remove this IP completely, so I removed from WHM and again clicked to configure all clients, but this does not remove 1.2.3.4 from all cPanels. How can I do this?

    Vijay

  2. #2
    Member
    Join Date
    Jan 2009
    Posts
    8
    cPanel/WHM Access Level

    Root Administrator

    Default Re: 'Additional MySQL Access Hosts' issue

    I have exactly the same issue!

  3. #3
    Member minosjl's Avatar
    Join Date
    Jun 2011
    Location
    India
    Posts
    163

    Smile Re: 'Additional MySQL Access Hosts' issue

    Hi,

    I think this is because of the cpanel cache.Could you please check your ip address is exists in the dir /var/cpanel/databases

    you can run the command grep ip /var/cpanel/databases/* , if its exists you can update the cache by running the cpanel binary " /usr/local/cpanel/bin/setupdbmap "

    Please check this from your end and update this post.Your reply is much appreciated ....

  4. #4
    Tam
    Tam is offline
    Member
    Join Date
    Jul 2004
    Posts
    102

    Default Re: 'Additional MySQL Access Hosts' issue

    Same issue, and the above did not resolve it. Seems there is no 'undo' for the 'do'.

  5. #5
    Member Indianets's Avatar
    Join Date
    Jun 2008
    Posts
    62
    cPanel/WHM Access Level

    Root Administrator

    Thumbs up Re: 'Additional MySQL Access Hosts' issue

    Hi Tam,

    After a bit of research, I could find that it's all stored in --

    Code:
    /var/cpanel/databases/grants_cpuser.yaml
    in format --

    Code:
    ---
    MYSQL:
      cpuser:
        cpuser:
          - GRANT USAGE ON *.* TO 'cpuser'@'1.2.3.4' IDENTIFIED BY PASSWORD '*XXXXXXXXXXXXXXXXXXXX'
          - GRANT USAGE ON *.* TO 'cpuser'@'localhost' IDENTIFIED BY PASSWORD '*XXXXXXXXXXXXXXXXXXXX'
    cpuser => users which show the IP under cPanel > Remote Database Access Hosts
    1.2.3.4 => The IP which we applied to all and couldn't be removed.

    It would be best if someone from cPanel can have a word on 'How Safe is to remove that line?'.

    Vijay

  6. #6
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: 'Additional MySQL Access Hosts' issue

    Removing the line only removes the mapping for the cPanel file. It doesn't remove the SQL in the /var/lib/mysql/mysql table that stores the grants for the IPs. You'd have to remove them in MySQL command line, or in each individual cPanel.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  7. #7
    Member Indianets's Avatar
    Join Date
    Jun 2008
    Posts
    62
    cPanel/WHM Access Level

    Root Administrator

    Default Re: 'Additional MySQL Access Hosts' issue

    Tristan,

    I have checked the tables in db 'mysql' and the IP was not there. Could it be due to removing the IP from WHM and running for all account by clicking "click here".

    I mean I made the remote host textarea blank in WHM and then came back and updated for all users, which did update something for all users one by one in GUI. That probably removed the grants from mysql actually which you are referring to.

    It's always best to test, if possible, could you please test it's behavior on your test machine?

    Vijay

  8. #8
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: 'Additional MySQL Access Hosts' issue

    In my tests, this did not occur. If I removed the IP in WHM > Additional MySQL Access Hosts area, then clicked "Save", I receive an error message:

    MySQL access hosts saved.
    Invalid MySQL hosts

    .
    Next, if I then click the "Click Here" link below that, while it does show the various users updating, when I check /var/lib/mysql/mysql database, the mysql.user table still lists the IP under the database users who had it previously added as a Host.

    My test machine is running cPanel EDGE 11.31.3.3
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads

  1. [case 44978] bug? - Additional MySQL Access Hosts
    By anythingss in forum Archived Feature Requests
    Replies: 1
    Last Post: 01-21-2011, 09:59 AM
  2. Bug in transfer proccess - additional MySQL access hosts
    By Pixelation in forum Database Discussions
    Replies: 3
    Last Post: 07-16-2010, 10:54 AM
  3. Bug in transfer proccess - additional MySQL access hosts
    By Pixelation in forum cPanel & WHM Discussions
    Replies: 3
    Last Post: 07-16-2010, 10:54 AM
  4. Confusion - Additional MySQL Access Hosts
    By jimpoo in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 07-21-2009, 11:57 PM