Good day; I am making an C# desktop application using MySQL as database. The execution works fine when using local server "localhost", but I want to install it in other computers and keep the database in my computer. I proceeded like following to allow other computers to connect the database :
- I added a new user to the database and gave it all required permissions.
- I added the IP address of the computer in which the database exist This is the connection string :
String connString = "Server = '192.168.xxx.xxx'; " + "Port = '3306'; " + "Database = 'mydb'; " + "uid = 'dbUser'; " + "pwd = 'userPassword';" + "Persist Security Info=true;";
From the computer in which the database is installed, I can execute without any problem but from other computers I can not connect to the database. It gave me the error :
Unable to connect to any of the specified MySQL hosts.
- Computers are in network but not in the same domain network.
- There is no problem with the port.
Can anyone help me please ?
Persist Security Infois applicable for MySQL.telnet, orTest-NetConnection 192.168.xxx.xxx -Port 3306. Have you verified that MySQL Server is configured to accept remote connections? I'm not sure if in the case of different domains connected in a network, you don't need to configure something additionally - e.g. routing, unblocking ports. Maybe you could write how these domains are networked? how is routing set up? Is traffic on any port between machines working? Or maybe you need to refer to the name and configure internal DNS.