I just need to be pushed in the right direction. C# win app and remote DB

Summary: Looking for the current, correct way for Windows Applications to securely communicate with MySQL.

I just completed a PHP project which utilizes PHPAuth for security. It’s a stock portfolio manager. There is a signup, login, and basic commands. Here is what I need help with and surprisingly I cannot find any resources for such a simple question:

I would like to create a Windows Application in C# that connects to the same MySQL database that my web app uses. All of the examples that I find, however, have the MySQL credentials hard coded in the application! Also, many of the articles are from 2010.

I can’t be the only one that wants to create a Windows app which connects to a remote DB. It’s 2020 and there must be a secure way this is done. Is this where REST would come into play?

I really need a push in the right direction

Thank you!

.NET Foundation Website | Blog | Projects | Code of Conduct