Problem migrating for Live server

Hello everyone,

I’ve developed my application on my computer (localhost).

Now I’m migrating it to a live webserver (free).

The problem is that I’m having this problem when accessing the database: “SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known”

My db.php file on my localhost is this:

<?php

return [

'class' =&gt; 'yii&#092;db&#092;Connection',


'dsn' =&gt; 'mysql:host=localhost;dbname=trabalhadores_junta',


'username' =&gt; 'Nuno',


'password' =&gt; 'Nuno', 


'charset' =&gt; 'utf8',

];

On my webserver i’ve changed it to (according to the information they provide me):

<?php

return [

'class' =&gt; 'yii&#092;db&#092;Connection',


'dsn' =&gt; 'mysql:host=fdb15.freehostingeu.com;dbname=2144179_db',


'username' =&gt; '2144179_db',


'password' =&gt; '********',   (not showing the password)


'charset' =&gt; 'utf8',

];

Can you tell me what’s wrong?

In my local file, i’ve changed the information to the live one and I still get the error.

Thank you.

Nuno

For some reason it cannot convert the host name… try to use IP address instead of "[color=#1C2837][size=2]fdb15.freehostingeu.com"[/size][/color]

Hi Maurizio,

I«ve changed to the IP address: 83.125.22.220, but I’m still getting the same error.