1const mysql = require('mysql');
2
3const con = mysql.createConnection({
4
5 host: "localhost",
6 user: "yourusername",
7 password: "yourpassword"
8
9 });
10
11con.connect(function(err) {
12 if (err) throw err;
13 console.log("Connected!");
14});