replacing sqlite3 with mysql