Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

how to connect DDNS MySQL server to Remote computer in c# (no replies)

$
0
0
I have a home server (Qnap). I set a DDNS address, using the service no-ip and everything works perfectly. The point that I want to write code in C# - to connect the MySQL server (the service run on the Qnap, and the port 3306 is enable to MySQL service). The problem, when I write the IP address of the DDNS - is unable to connect ...

private void Initialize()
{
server = "XXX.XXX.XXX.XXX,3306";
database = "test";
uid = "test";
password = "test";
string connectionString;
connectionString = "SERVER=" + server + ";" + "DATABASE=" + database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";

connection = new MySqlConnection(connectionString);
}


I have a home server (Qnap). I set a DDNS address, using the service no-ip and everything works perfectly. The point that I want to write code in C# - to connect the MySQL server (the service run on the Qnap, and the port 3306 is enable to MySQL service). The problem, when I write the IP address of the DDNS - is unable to connect ...

private void Initialize()
{
server = "XXX.XXX.XXX.XXX,3306";
database = "test";
uid = "test";
password = "test";
string connectionString;
connectionString = "SERVER=" + server + ";" + "DATABASE=" + database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";

connection = new MySqlConnection(connectionString);
}


It is important to note: when I work on the home network (WiFi), and connect to the local ip, for example: 10.0.0.6, the login successful...

I'd love to help, thank you very much

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>