1

how include Setup Connections and Parser?

var mysql   = require('mysql');
var pool = mysql.createPool({
   host     : 'localhost',
   user     : 'medb',
   password : '123458',
   database : 'test',
   connectionLimit: 100
});

What would be next ?

2
  • Hi this is complete step to get mysql connection with pool request. Commented Aug 21, 2017 at 5:35
  • thanks thats work for me now. Commented Aug 21, 2017 at 5:48

1 Answer 1

1

Hi this is complete step to get mysql connection with pool request.

var mysql   = require('mysql');

//Setup Connections and Parser
var pool = mysql.createPool({
    host     : 'localhost',
    user     : 'me',
    password : '12345',
    database : 'A2014',
    connectionLimit: 100
});

pool.getConnection(function(err, connection) {

    connection.query( 'select count(9) from mytbl;', function(err, rows) {
    connection.release();
    });
    pool.end();
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.