Can't get hostname for your address mysql error

htcmarket

Registered
Feb 21, 2017
1
0
1
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 :(
 

Eminds

Well-Known Member
Nov 10, 2016
319
34
28
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

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

Thank you.