Jump to content

Dreamhost + Link to database cannot be established: SQLSTATE[HY000] [2002] php_network_getaddresses:


saavedrajj

Recommended Posts

Hi
 
I'm migrating my Prestahop website to Dreamhost (VPS plan)
 
The domain name (example.com) is not hosted by Dreamhost. I have changed already the nameservers and everything's working fine: FTP accounts, MySQl database creation, emails, etc. So far so good...
 
I have done Prestashop migrations before with no problems but this time I'm having a MySQL issue. After having imported the  main sql.file to my new Dreamhost database I'm having this error message:
 
Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/dh_8evifc/example.com/classes/db/DbPDO.php on line 62
Link to database cannot be established: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
 
I have made some research and that error message it's because you my website can't resolve the database hostname, maybe because DNS problems, and that's why the host is unreachable.
 
I have made sure to copy and paste correctly the values below in the example.com/config/settings.inc.php file
_DB_SERVER_
_DB_NAME_
_DB_USER_
_DB_PASSWD_
 
 
Have you had this problem before?
 
Can anybody help me with this?
Edited by saavedrajj (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...