my dog learned polymorphism*
The moose likes JDBC and the fly likes NOt able to connect to actual database on the web server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "NOt able to connect to actual database on the web server" Watch "NOt able to connect to actual database on the web server" New topic
Author

NOt able to connect to actual database on the web server

Raghav Mathur
Ranch Hand

Joined: Jan 12, 2001
Posts: 641
How to run MySql scripts to give priveliges for a pirticular Database.
when i try to connect locally to my MySql database with the following syntax
String url = "jdbc:mysql://10.15.0.2:3306/unistal?user=root&password=";
connection = DriverManager.getConnection(url);
it works fine but when i connect to the actual database on the web server with actual userID and Password , it fails to connect .
I,am sure that i,am wrigin the correct password and username because i,am runnning my PHP scripts through the same username and password.
What could be the reason that i,am not able to connect to the server ?
PLease guide me a bit .
Thanks in advance


Raghav.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Are you sure that the request is making it to the machine with MySQL running?
Through trial and error and hair pulling, I just discovered that my ISP was blocking WAN access to port 80. (That's why the Beginner's Wiki is running on that strange port 4000 while it's developed in the initial stages.)


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Raghav Mathur
Ranch Hand

Joined: Jan 12, 2001
Posts: 641
Dirk
i,am sure that MySql is running on the web sever as my PHP scripts work fine . It is only when i try to make a connection from my local machine to the database( on the web server) , it doesn't let me ... does it have something to do with the rights which are to be granted to me .
Please guide me a bit
Thanks in advance
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Are you sure that the request from outside of the network, or from outside of the machine with MySQL, is actually being received by the machine with MySQL running? Is it possible that a firewall is blocking access on that port?
Raghav Mathur
Ranch Hand

Joined: Jan 12, 2001
Posts: 641
Originally posted by Dirk Schreckmann:
Are you sure that the request from outside of the network, or from outside of the machine with MySQL, is actually being received by the machine with MySQL running? Is it possible that a firewall is blocking access on that port?

NO . I have tested my PHP scripts which run on the server . they work .
I haven't tested anything from outside the server.
There is no firewall as such .
Can it be a prob of granting some sort of Privileges.Maybe those grants have not been given to a connection which comes from a remote client .
Can this be a reason ?
 
 
subject: NOt able to connect to actual database on the web server