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' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=trabalhadores_junta',
'username' => 'Nuno',
'password' => 'Nuno',
'charset' => 'utf8',
];
On my webserver i’ve changed it to (according to the information they provide me):
<?php
return [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=fdb15.freehostingeu.com;dbname=2144179_db',
'username' => '2144179_db',
'password' => '********', (not showing the password)
'charset' => '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