For applications to connect to the mysql database, often the credentials are stored in a properties file, like, for example jdbc.properties that have the username, password in cleartext.
Is there a very secure way of doing this ? Ofcourse, I can restrict access to this file, make it hidden etc. But are there alternate means to connect to a DB or ways to connect to a DB other than the properties file approach ?
One option is to store such sensitive information in another DB in an encrypted way. Then the application program can connect to this DB (using the properties file way) and then decrypt the sensitive information (instead of reading it from the properties file) and use it to initiate connection to the application DB.
Are there any other approaches ? Pls share your experiences and ideas. I am using Linux boxes to host mysql.