Open McLotos opened 1 year ago
@rodrigogs ? Are you there? =)
Try this, Working for me.
const instance = new MySQLEvents(
{
host: dbConfigs.host,
port: dbConfigs.port,
user: dbConfigs.username,
password: dbConfigs.password,
},
{
startAtEnd: true,
excludedSchemas: {
mysql: true,
},
}
);
instance
.start()
.then(() => {
console.log("Running MySQLEvents!");
instance.addTrigger({
name: "xyz",
expression: "*",
statement: MySQLEvents.STATEMENTS.ALL,
onEvent: (event) => {
// Here you will get the events for the given expression/statement.
// This could be an async function.
console.log("event", event);
},
});
})
.catch((err) => console.error("Something bad happened MySQLEvents", err));
instance.on(MySQLEvents.EVENTS.CONNECTION_ERROR, console.error);
instance.on(MySQLEvents.EVENTS.ZONGJI_ERROR, console.error);
try using example from readme.
so get error
t