Initial version, mysql supported

MySql events now supported.
This function probably ought to call clearInterval() for the setInterval() above it.