Guest User

Untitled

a guest
Feb 25th, 2016
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. var mysql = require('mysql');
  2. var pool = mysql.createPool({
  3. host : “hostName”,
  4. user : “username”,
  5. password: “password”
  6. });
  7.  
  8. pool.getConnection(function(err, connection){
  9. connection.query( “select * from table1”, function(err, rows){
  10. if(err) {
  11. throw err;
  12. }else{
  13. console.log( rows );
  14. }
  15. });
  16.  
  17. connection.release();
  18. });
Add Comment
Please, Sign In to add comment