Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mysql connection in node js

/*
To download and install the "mysql" module, 
open the Command Terminal and execute the following: npm install mysql  
*/
var mysql = require('mysql');  
var con = mysql.createConnection({  
  host: "localhost",  
  user: "root",  
  password: "12345"  
});  
con.connect(function(err) {  
  if (err) throw err;  
  console.log("Connected!");  
});  
Source by www.javatpoint.com #
 
PREVIOUS NEXT
Tagged: #mysql #connection #node #js
ADD COMMENT
Topic
Name
3+3 =