Is there a way to connect to a remote instance of MySQL without exposing MySQL credentials by using Java decompiler ?
If a desktop application connects to a MySQL Server, should you assign a read only access to user to access it? Is this secure enough?
If you find yourself asking these questions then it is probably time to implement some delegated authorization. Instead of the user accessing MySQL directly from your desktop app, create a thin server layer with each user assigned a set of credentials to access. All access to the database will be mediated through this server, which will be responsible for securing the DB and ensuring only data relevant to each user is actually given to them.