Quote:
Originally Posted by nsoma26@gmail.com
Not able to connect database from my local machine to remote database through c# code
string dburl = "Data Source=10.10.10.10;user id=****;password=***";
MySqlConnection MyCon = new MySqlConnection();
MyCon = new MySqlConnection(dburl);
MyCon.Open();
Console.WriteLine("connected");
dummy data is entered in the data source
|
Read the "Question Guidelines" link in my posting signature. You've posted one *VERY* small piece of code, with zero context, told us what kind of database (ASSUMING MySQL), version/distro of Linux, any error(s)/message(s) you're seeing, or what kind of environment you're in. There are LOTS of reasons this wouldn't work, such as:
- Firewall/network security
- Bad user ID/password
- Database not set up to accept connections from your particular host
- Your code is wrong
- You don't have permissions to write/read the database
Among others. Provide details and we can try to help. Post code in CODE tags.