Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mysql = require('mysql');
- var con = mysql.createConnection({
- host: "localhost",
- user: "root",
- password: "",
- database: "experiment"
- });
- /*
- con.connect(function(err) {
- if (err) throw err;
- console.log("Connected!");
- });
- */
- con.connect(function(err) {
- if (err) throw err;
- console.log("Connected!");
- con.query("SELECT * FROM users", function (err, result) {
- if (err) throw err;
- console.log("Result: " + result);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement