setup mysql and api endpoints