Add configuration options and support mysql