Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- FOR INSTALLING OFFICIAL MYSQL DRIVER
- npm install mysql
- */
- var mysql = require('mysql');
- //For Configuration
- var connection = mysql.createConnection({
- host: "localhost",
- user: "your_mysql_username",
- password: "your_mysql_password"
- });
- //For Checking connection is established or not
- connection.connect(function(err) {
- if (err) throw err;
- console.log("Connected!");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement