The following connection works using mysql node
// create mysql connection
const con = mysql.createConnection({
host: 'ip-208-109-35-193.ip.secureserver.net',
user: 'myusr',
password: 'mypass',
database : 'admin_ad',
port: '3306'
});
con.connect(function(err) {
if (err) {
console.log('Failed to connect MySQL.');
console.error(err);
return;
}
});
However when I try another host such as:
const con = mysql.createConnection({
host: '64.64.64.64',
user: 'myusr',
password: 'mypass',
database : 'admin_ad',
port: '3306'
});
The connection does NOT work. I tried these exact same credentials in a Sequel application locally (Sequel Ace) on mac and it works I get a connection. Does node mysql add somethign to the host or is there some type of protection set that needs to be undone? I have no idea why the same exact credentials that work on an application don't work on node mysql.