What will be the connection string --- Please read the entire question first
-
Hi all,
**I have posted the same question some time ago... but I didn't get any solution. Please read below first...**
I want to connect a MySql Database. Suppose..... Database Name is mydb Database located on PC-1 (IP- 192.168.0.10) PC-1 user id = abc PC-1 password= 123 MySQL Server user ID = root MySQL Server password= mypassword now what will be the connection string for PC-1 to connect to the database ? now I want to connect the database(mydb) from another pc (suppose this pc name is PC-2 and the IP is 192.168.0.11) what will be the connection string for PC-2 to connect the PC-1 database ? I searched connectionstrings.com[^] and found ... StandardServer=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
and Specifying TCP port
Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;
Pwd=myPassword;but nowhere found if the server pc (PC-1) is protected by user id and password. In this case what should I do ? I Tried both the above connection string. They are Ok for PC-1 to connect its own database (localhost) but when I tried to connect the database from PC-2, I got the error**
Quote:
Host '192.168.0.11' is not allowed to connect to this server
**
**Can anybody help me ?**
-
Hi all,
**I have posted the same question some time ago... but I didn't get any solution. Please read below first...**
I want to connect a MySql Database. Suppose..... Database Name is mydb Database located on PC-1 (IP- 192.168.0.10) PC-1 user id = abc PC-1 password= 123 MySQL Server user ID = root MySQL Server password= mypassword now what will be the connection string for PC-1 to connect to the database ? now I want to connect the database(mydb) from another pc (suppose this pc name is PC-2 and the IP is 192.168.0.11) what will be the connection string for PC-2 to connect the PC-1 database ? I searched connectionstrings.com[^] and found ... StandardServer=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
and Specifying TCP port
Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;
Pwd=myPassword;but nowhere found if the server pc (PC-1) is protected by user id and password. In this case what should I do ? I Tried both the above connection string. They are Ok for PC-1 to connect its own database (localhost) but when I tried to connect the database from PC-2, I got the error**
Quote:
Host '192.168.0.11' is not allowed to connect to this server
**
**Can anybody help me ?**
Biplob Singha Shee wrote:
Can anybody help me ?
Reposting your question isn't going to help.
Biplob Singha Shee wrote:
Please read the entire question first
I did. Twice. The answer "I cannot do that" doesn't mean that the answer you have been given was incorrect. You could have asked how to find the path. I'd answer that you can search your entire HD. By hand. Most (professional) databases do not allow making remote connections in a default install. It's a security-thing. You cannot change that using a connection-string. The fact that you're using XAMP simply means that the config-files are in another location than the default MySQL path. You'd have to find the file yourself, make the change to allow remote connections, and restart the server.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
-
Hi all,
**I have posted the same question some time ago... but I didn't get any solution. Please read below first...**
I want to connect a MySql Database. Suppose..... Database Name is mydb Database located on PC-1 (IP- 192.168.0.10) PC-1 user id = abc PC-1 password= 123 MySQL Server user ID = root MySQL Server password= mypassword now what will be the connection string for PC-1 to connect to the database ? now I want to connect the database(mydb) from another pc (suppose this pc name is PC-2 and the IP is 192.168.0.11) what will be the connection string for PC-2 to connect the PC-1 database ? I searched connectionstrings.com[^] and found ... StandardServer=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
and Specifying TCP port
Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;
Pwd=myPassword;but nowhere found if the server pc (PC-1) is protected by user id and password. In this case what should I do ? I Tried both the above connection string. They are Ok for PC-1 to connect its own database (localhost) but when I tried to connect the database from PC-2, I got the error**
Quote:
Host '192.168.0.11' is not allowed to connect to this server
**
**Can anybody help me ?**
Open a command window on the CLIENT machine - NOT the database machine. Verify that you have telnet. Run telnet use the following command.
telnet 192.168.0.11 1234
There are two results to the above. First it succeeds which means it presents a blank screen (command window) or it returns an error message either quickly or after a couple of minutes. Note carefully unless the above succeeds NOTHING you do with a connection string will EVER succeed at working. If the above fails then you must look to something besides your application for a solution. Some POSSIBLE but not a complete list are the following - The database is not set up to accept remote connections. - The database is using a different port. - The host name\ip address is wrong. - there is a firewall that is preventing the connection. - There is no possible network path from the client machine to the database machine.