add mysql, mtail
some code cleanup