I want to create a client-database application using Java and MySQL. As far as I know, Java can be decompiled and using MySQL directly from the client, the database credentials would be exposed.
How can I create a Java client using a MySQL server, without the user being able to figure out my database credentials?