Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
demo_db_connection.js:
var mysql = require('mysql'); var con = mysql.createConnection({ host: "localhost", user: "myusername", password: "mypassword" }); con.connect(function(err) { if (err) throw err; console.log("Connected!"); });
C:\Users\My Name>node demo_db_connection.js
Connected!