Question: ```
var MySQLEvents = require('mysql-events');
var dsn = {
  host:     'localhost',
  user:     'root',
  password: '' // no password set that's why keep blank
};
var mysqlEventWatcher = MySQLEvents(dsn);
console.log(mysqlEventWatcher);
var watcher =mysqlEventWatcher.add(
   'myDB.myTable',
  function (oldRow, newRow, event) {
     //row inserted
    if (oldRow === null) {
      //insert code goes here
    }

     //row deleted
    if (newRow === null) {
      //delete code goes here
    }

     //row updated
    if (oldRow !== null && newRow !== null) {
      //update code goes here
    }

    //detailed event information
    console.log(event); // don't matter, it updates, delete or insert
  },
  'Active'
);

```

Take code from <https://www.npmjs.com/package/mysql-events>

When I try to print console.log(mysqlEventWatcher); ,
it prints something like that

```
{ started: false,
  zongji: {},
  databases: [],
  tables: {},
  columns: {},
  events: [ 'tablemap', 'writerows', 'updaterows', 'deleterows' ],
  triggers: [],
  dsn: { host: 'localhost', user: 'root', password: '' },
  settings: {},
  connect: [Function: connect],
  add: [Function: add],
  remove: [Function: remove],
  stop: [Function: stop],
  reload: [Function: reload],
  includeSchema: [Function: includeSchema] }

```

After writing this code, I update specific table('myTable') in which I implement in mysqlEventWatcher, then It won't go to that method as inside that I am printing event.

I don't know which thing I am missing

Answer: 
I'm adding this answer because this appears first on Google. Hopefully this will help someone.

I'm using XAMPP as my server and in order to get it to work, I edited the `my.cnf` file, which can be found here: `xampp\mysql\bin`, with the following:

I enabled every instance of `log-bin=mysql-bin` (by removing the `#`) and I wrote-in `binlog_format=row`.

EDIT :  

server-id = 1  

log\_bin = /var/log/mysql/mysql-bin.log  

binlog\_format = row
As well as checking @nguyendn answer, please try and run ZongJi standalone to check it's functioning

```
var ZongJi = require('zongji');
var zongji = new ZongJi({
  host     : 'localhost',
  user     : 'user',
  password : 'password',
  debug: true
});

zongji.on('binlog', function(evt) {
  evt.dump();
});

```

If ZongJi is not working, mysql-event will not work either. For me ZongJi was only working on localhost, not remote IP