Implement database connection with mongodb, remove mysql code