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.

Errors in MySQL Log regarding dbs/users that don't exist

Discussion in 'General Discussion' started by sneader, Jun 11, 2009.

  1. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    I used the cPanel to cPanel transfer for a number of accounts. I noticed that I am getting errors in the MySQL Log file at /var/lib/mysql/my.hostname.err -- these errors all point to databases and/or usernames that I cannot find on my system at this time (but may have existed at one time).

    The errors are all related to using hostnames in cPanel for Remote MySQL access. I'm assuming that you can no longer user hostnames and must use IPs.

    Any pointers on how I can find these Remote MySQL entries, and then remove them?

    A few examples (usernames and hostnames redacted)

    090611 7:14:20 [Warning] 'db' entry 'ucake5\_ucakewa ucake5@old.hostname.com' ignored in --skip-name-resolve mode.
    090611 7:14:25 [Warning] 'user' entry 'root@some.hostname.com' ignored in --skip-name-resolve mode.
    090611 7:14:25 [Warning] 'user' entry 'umite2@%oldhost.com' ignored in --skip-name-resolve mode.
    090611 7:14:25 [Warning] 'user' entry 'umite2_spared2@%oldhost.com' ignored in --skip-name-resolve mode.

    Is there a text file somewhere with a list of all the remote hosts, that could be edited?

    - Scott
     
    #1 sneader, Jun 11, 2009
    Last edited: Jun 11, 2009
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Your MySQL service has name resolution disabled ( ignored in --skip-name-resolve mode). If this is intentional then you'll need to do one of the following:

    1. Replace the hostname entries in the MySQL db and user tables with the proper IP addresses. You'll also need to track down every reference to the hostnames in cPanel and WHM, replacing those with the proper IP addresses; or

    2. Reconfigure your MySQL service to use name resolution ( check /etc/my.cnf ).
     
  3. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Hi Kenneth. Thanks for the quick reply (and for taking time to help in the forums!)

    Name Resolution was not disabled by choice, so that could be an easy way to fix.

    BUT... it would be covering up a larger issue... the error logs at this point are for usernames and dbs that I cannot find. You said "Replace the hostname entries in the MySQL db and user tables with the proper IP addresses" but I don't know where to start looking?

    I think it makes sense to clean these up, whether I enable name resolution or not?

    Thanks again!! Sure hope I make it to the conference again this year, just to shake your hand (and some others at cPanel that really come through for me!)

    - Scott
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The Warning messages record 'user' and 'db' as the location of the problems. Try this via the MySQL command line client:

    Code:
    mysql> use mysql;
    mysql> select Host, User from user;
    
    That will display every Host + User entry in MySQL's user table. You can also do something with PHPMyAdmin. Once you verify those entries exist, you should be able to remove them:

    Code:
    mysql> delete from user where User="foo" and Host="example.com";
    
    Similar actions can be taken for the db table.
     
  5. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Thanks Kenneth! "flush privileges" would need to be run afterwards also, right?

    - Scott
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    It wouldn't hurt.
     
Loading...

Share This Page