I have an api written in PHP for a backend service that supports my Android app. I'm in the process of setting up different environments - development, staging, production - each with they're own database. The API performs queries to its respective MySQL database and everything is up and running just great in development.
My question is about the proper technique for handling different database connections for the api in each environment? Is there an easier way to change the database that my php->mysql connections use than changing them all by hand manually before deploying from, say, development to staging?
I'm coming from an Android environment, so what comes to mind right away is Gradle's build flavors and how that allows different code to be used based on the specific build variant you want.