refactor mysql_* files