Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mysql = require('mysql');
- var pool = mysql.createPool({
- host : “hostName”,
- user : “username”,
- password: “password”
- });
- pool.getConnection(function(err, connection){
- connection.query( “select * from table1”, function(err, rows){
- if(err) {
- throw err;
- }else{
- console.log( rows );
- }
- });
- connection.release();
- });
Add Comment
Please, Sign In to add comment