Php can't connect to mysql

php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution


I have checked your website code, and I found this:

$dbhost = '';

As you can see, there is a tab character before the database hostname, which is likely why PHP has trouble parsing the domain name. If you remove the excess whitespace, your code should be able to connect.

Thanks for that.

But now I am getting this:

Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'epiz_23637101'@'' (using password: YES) in /home/vol9_5/ on line 14
Access denied for user 'epiz_23637101'@'' (using password: YES)

I just checked it and the script seems to work now.

Please note that it may help to login to the control panel after changing the password, as that seems to solve these access problems.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.