adding support for mysql and variable to select which db to use