Impossible to access database (OVH server) [closed]

I created two apps with Symfony. For these 2 apps, I can’t connect to the databases with the same symptoms (timed out connection).

Information common to both apps

  • Host : OVH
  • subscription : gold created in octobre 2016
  • Datacenter : Gravelines 1
  • Version php 7.1 (but same in 7.2, I just changed to have the same as
    in dev environment)

App 1:

  • Database supplied with the offer
  • Phpmyadmin connection: OK
  • PDO connection via test script: OK
  • Line of the .env file:

DATABASE_URL = mysql: // nombase1: [email protected]: 3306 /
nombase1 serverVersion = 5.6?

  • return error for doctrine:migrations:migrate

SQLSTATE [HY000] [2002] php_network_getaddresses: getaddrinfo failed:
Name or service not known

App 2:

  • Private sql database
  • Phpmyadmin connection: OK
  • PDO connection via test script: OK
  • Line of the .env file:

DATABASE_URL = mysql: // nombase2: [email protected]: port /
nombase2 serverVersion = 5.7?

  • return error for doctrine:migrations:migrate

An exception occurred in driver: SQLSTATE [HY000] [2002] Connection
timed out

These errors are probably trivial, but after a full weekend of research on the forums, various and varied tests and a call to the OVH hotline which refers me to the symfony hotline, I decide to open a post.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *