开发者

Connect to mySQL over LAN

Hey all, i am having problems with connecting to a PC on my local LAN thats running the mySQL database.

The code in VB6 i have is:

.ConnectionString = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=\\SERVERPC;DATABASE=lstoredb;UID=root2;PWD=thepassw;OPTION=3"

If i put "localhos开发者_C百科t" then it works just fine (i have mysql running on my DEV system as well) But once i put it on the other machine it doesn't ever connect.

I can access the SERVERPC in my network but for some reason VB6 can not find it? I've even tried the IP address:

.ConnectionString = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=192.168.1.9;DATABASE=lstoredb;UID=root2;PWD=thepassw;OPTION=3"

And it still does not work. Turned off all firewalls and still nothing... Even added port 3306 to my router for the 192.168.1.9 IP and nothing still!

The DEV computer is Windows XP SP3 and the mySQL server is on Vista Home Prem. 32-bit.

Any help would be great! Thanks! :o)

David


You need to tell MySQL to allow remote connections to certain databases from certain hosts for certain users. Source

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜