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.

Can't get hostname for your address mysql error

Discussion in 'Database Discussions' started by htcmarket, Feb 21, 2017.

  1. htcmarket

    htcmarket Registered

    Joined:
    Feb 21, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    GB
    cPanel Access Level:
    Root Administrator
    Hi,
    I have some problem when I try connect to remote DB from server:
    Error!: SQLSTATE[HY000] [1042] Can't get hostname for your address

    I am use PDO connection(php)
    In local virtual server - I success connected, but in production - no!
    Can some one help me, please :(
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    174
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Fix the connecting machine's reverse DNS , make sure you have RDNS added and resolving to the right IP.
    You should also issue a FLUSH HOSTS statement on the MySQL server.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,286
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Let us know if the issue persists after following the instructions in the previous post.

    Thank you.
     
Loading...

Share This Page