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.

MySQL access host is not applied to existing db users

Discussion in 'cPanel Developers' started by chamithlkml, Feb 24, 2016.

  1. chamithlkml

    chamithlkml Member

    Joined:
    Apr 2, 2014
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hi,
    I tried adding an external host as MySQL access host for a cPanel user account via the cPanel API UAPI Mysql::add_host and then API2 MysqlFE::authorizehost. In both scenarios, ip and host are successfully added into the list of access hosts, but when I try to access the database from the external host, it's getting failed.
    Then I tried adding the external host and IP into MySQL Access Hosts and updated for all users via WHM admin panel. It did not fix the issue too.
    cPanel error log seems not giving any meaningful error message. Could you please help me to debug this issue.?
    Server is running OS - CloudLinux 6.7 and cPanel - 11.52.3.1.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you let us know the output to /usr/local/cpanel/logs/error_log when adding the host? Also, is the /var/cpanel/databases/grants_<username>.yaml updated with the correct entries after adding the host?

    Thank you.
     
  3. chamithlkml

    chamithlkml Member

    Joined:
    Apr 2, 2014
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Thanks for the response Michael.

    Suspicious part of cPanel error log is as follow:
    info [cpanellogd] New bandwidth database metadata: greentechgroup.homemagonline.ca_hourly_http_interpolation_end_iso8601 = “2013-10-29T04:00:00Z”
    warn [MysqlFE::changedbuserpassword] Encountered error in MysqlFE::changedbuserpassword: You do not control a MySQL user named “xxxxx_xxxxx”.

    Yaml file is updated by the correct IP and the host. But inside .yaml file, I could find most underscores ("_") are escaped by adding "\_" fields in the yaml file. Not sure whether the issue is raised by the escaping of underscores.


    Regards.
    - Chamith
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page