Connection problem with MYSQL

Good morning.
All of a sudden I can no longer connect to the DB.
The connection parameters are correct.

$servername = "fdb31.freehostingeu.com";
$username = "3967282_users";
$password = "XXXXXXXXXX";
$dbname ="3967282_users";
$conn = new mysqli($servername, $username, $password, $dbname);

### Website URL

Error Message

La pagina non funziona

myawesomeworks.free.nf al momento non è in grado di gestire la richiesta.

HTTP ERROR 500

Davide.

Looking at your code, your credentials do not look like InfinityFree credentials. Please go to the Client Area and copy the credentials from there.

3 Likes

Sorry, you’re right, I copied and pasted wrong.
The Parameters are:
$servername = “sql310.infinityfree.com”;
$username = “if0_35438125”;
$password = “xxxxxxxxxxxxxx”;
$dbname=“if0_35438125_mydb”;
$conn = new mysqli($servername, $username, $password, $dbname);

But it doesn’t connect.

Read on

4 Likes

many thanks KangJL.
Having a stack trace it was easy to find the solution.
Davide.

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