First off, if there is an exact duplicate - I didn't find any so I apologize in case the answer was already provided.
I'll present the problem I'm facing, hoping I'll get some insight or a straightforward "not possible" answer.
How to secure database credentials in a web application in case the server where PHP is gets compromised? Assume that in this problem's case we are not talking about shared hosting, VPS or anything alike, there's only one person who has access to the box that stores MySQL information.
MySQL server itself is located at another (remote) box and allows connections from only a range of IP addresses (bound to the PHP box).
How to ensure that malicious user will not be able to obtain the details needed for connection string for MySQL? Assume that the user has broken the root login of the linux box running PHP.
What steps would you take towards providing highest security in terms of accessing information needed to establish MySQL connection in such a case?
Thank you for reading and commenting in advance.