How can I make a MySQL Connection more secure using the MySQL Plugin for my app?

When looking at the plugin the very first thing i see is:
This library provides a MySQL driver for connecting to remote mysql server.

Please don't use this library in your product.

Hackers could either just sniff the traffic for credentials or disassemble the app to get them.

If you use it in your app, use it at your own risk.

Hoverver, if your app is only for personal use or don't care about sercurity issue, you can use this library to connect to MySQL directly without Web/REST API server.

Examples 1

using MySql.Data.MySqlClient;

public void GetAccountCountFromMySQL()
new I18N.West.CP1250 ();
MySqlConnection sqlconn;
string connsqlstring = "Server=your.ip.address;Port=3306;database=YOUR_DATA_BASE;User Id=root;Password=password;charset=utf8";
sqlconn = new MySqlConnection(connsqlstring);
string queryString = "select count(0) from ACCOUNT";
MySqlCommand sqlcmd = new MySqlCommand(queryString, sqlconn);
String result = sqlcmd.ExecuteScalar ().ToString();
LblMsg.Text = result + " accounts in DB";
} catch (Exception ex)
Console.WriteLine (ex.Message);

Sign In or Register to comment.