Environment
I have a java application that is going to need access to a mysql database to load and save data and the load/save cannot occur by writing to disk, so it has to be through the database.
I was reading about JNDI but I'm not sure that will help because every example I've seen has been for a java servlet and my goal is to use it in a java standalone application.
Questions
What is the best way to store the
mysqlusername and password so that all clients can access the database but still protecting the login information so that my program is not decompiled and someone uses themysqllogin to drop my all my tables?What would you guys recommend? I'd like this to be secure as possible and I'm open to any suggestions.
Only a handful of statements will be executed on the database and those are hard coded strings that are used in prepared statements so I think that is secure or no?
But my main issue is protecting the database login information.