I'm creating a desktop application using Visual studio and C# that uses MySQL. I want to use the exe on another computer which is on the same network (the computer jas the .Net framework but no MySql install).
I am allowing MySql to be connected to remotely(by "from Host: %") on the system where my database resides.
My connection string is:
"SERVER=fullComputerName;" + "DATABASE=dbTest;" + "UID=abcd;" + "PASSWORD=myPassword;"
When I run the application on another computer on same network, it gives me the error开发者_运维知识库
your connection attempt failed for user 'abcd' from your host to server at 'fullComputerName:3306'.
I am not sure can we do something like that or I always need one computer to be server?
You might need to open your firewall on port 3306 for the machine running MySQL.
Opening that port up is necessary for the remote connection to work correctly.
Also are you able to connect to the remote database from other machines?
精彩评论