I'm setting up a GraphQL server however I need to connect to a remote phpMyAdmin server which my friend provided and i am getting the error:
Error: getaddrinfo ENOTFOUND 54.193.13.37/phpmyadmin 54.193.13.37/phpmyadmin:3306
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
here is the code i use to connect
const mysql = require('mysql');
const db = mysql.createConnection({
host: "54.193.13.37/phpmyadmin",
user: "some_user",
password: "some_password",
database:"some_DB",
})
db.connect((err) => {
if (err) throw err;
console.log("Connected!");
});
I've tried removing "http://", adding port, also the IP address 54.193.13.37 is an IP address for his clan website. So, the only way i have access to the database is by 54.193.13.37/phpmyadmin and i dont have any access to any config files or whatsoever, it's just a remote database that he gave me.
Thanks to whoever can help!
just remove the phpmyadmin in the host. Try host:
host: "54.193.13.37"
. Phpmyadmin is a web interface, but you want to connect directly to the mysql server wich is normaly on Port 3306.