replacing sqlite with mysql