convert to use mysql instead of sqlite