The most significant way to protect databases is to simply use authentication! There are production systems online with null and default administrator credentials. See the recent "The Real World" hack...
Rule 1: Simply use authentication instead of not using it... Obviously do not save the credentials in a public-readable file.
Rule 2: Create a subsidiary account with access only to the live schema being used by your PHP app, i.e. never use the global DBMS admin account as a service login.
Rule 3: Block access at the DBMS end to only allow the web server to access the API. Most access is network based so that will involve filtering by IP.
Rule 4: You can obfuscate a bit more by setting a non-standard port but this may require code changes in the API calls you coded.
The above are some simple steps anyone can perform. More serious securing would likely involve setting up SSL connectivity.