I have an application in Visual Studio that connects with a database in mysql, I'm using wamp server. In the first place works fine connected locally, but my question is what do I have to write/do if I want to connect this application with a remote mysql database in other place that is not local?
Here is the code that I have to work locally:
public static MySqlConnection ObtenerConexion()
{
MySqlConnection conectar = new MySqlConnection("server=127.0.0.1; database=tarjetas; Uid=root; pwd=;");
conectar.Open();
return conectar;
}
I tried to put the IP from the other Pc and doesn't work. The other PC has the same VS application and work as fine as mine locally.
None of those databases has an user or password. I tried to modify some wamp files that some users advice in other posts, but nothing of that worked.
Another thing that I have to say it's that I'm proficient with the network configurations. So the only thing that I have, is the IP from the other Pc that has the database.
What else do I have to do to make that connection remotely?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.