Welcome aboard! We are happy you are here and wish you good net-raft!
// at first you install "npm install mysql"
//put this code into app.js
var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "username",
password: "password"
});
con.connect(function(err) {
if (err) throw err;
console.log("Connected!");
});
// type "node app.js" in command prompt
The most helpful NODEJS solutions
get user ipNODEJS Click to see more ... 7.6K 1.7K