add mysql queries

also add support extracting parameters from config file