Connecting remote database using node-mysql

I'm trying to connect to a remote MySQL database (I can use phpmyadmin) using this NodeJs code:

var mysql = require('mysql');
var mysqlConnection = mysql.createConnection({
    host: myHost,
    port: myPort,
    user: myUser,
    password: myPw,
    database: myDb,
});
mysqlConnection.connect();

but whatever the host (localhost or the url of my website or ipaddress appearing in top-left corner of phpmyadmin ?) and port (8080 or 80 or 3306 ?) I put, I have ERROR 503. I don't have idea anymore, I tried any solution I found but still nothing works here ...