0

As defined in mysql

var post  = {id: 1, title: 'Hello MySQL'};
var query = connection.query('INSERT INTO posts SET ?', post, function(err, result) {
  // Neat!
});
console.log(query.sql); // INSERT INTO posts SET `id` = 1, `title` = 'Hello MySQL'

We can see the excecuted queries in log Please suggest how to log exceuted queries in promise-mysql

Thanks

rohitpal
  • 455
  • 1
  • 6
  • 21
  • Possible duplicate of [How to enable MySQL Query Log?](http://stackoverflow.com/questions/6479107/how-to-enable-mysql-query-log) – e4c5 Dec 26 '16 at 13:47

1 Answers1

0

This problem was related to GITHUB issue

From Github:

I'm not sure if this is helpful but you can set debug: ['ComQueryPacket', 'RowDataPacket'] when you create the connection to debug all queries.

Hope this helps.

rohitpal
  • 455
  • 1
  • 6
  • 21