Hi, I've made an application and it connects to my database.

But the issue is the details of the database can be found out through packet logging or something.

How can I stop this from happening and secure it, without having to have a third party such as PHP script etc.


You can use an encrypted mysql connection. I've never used mysql, only MS SQL and never in an environment that required encryption so I can't walk you through it but if you google "encrypted mysql connection" you might find what you need.

Try here which states

Using encryption

This one activates SSL encryption for all data sent between the client and server. The server needs to have a
certificate installed.

and here