change mongodb to mysql and use sqlalchemy