How to securely connect to MySQL Database

Hi,

I am developing a Web App which connects to a database on a different machine, i feel very uncomfortable with just entering the password in my connect method.
I have read about the SHA256 authentication plugin for MySQL Server but I do not know if it is sufficient enough, which way will be the best to accomplish this.

This is how i declare the MySQL password at the moment(iDB is my MySQLCommunityServer class):

iDB = New MySQLCommunityServer iDB.Password = "somerandompassword1234"

Thanks in advance,

  • Dian