Computing.Net > Forums > Programming > JSP & MySQL

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

JSP & MySQL

Reply to Message Icon

Name: Fel
Date: October 18, 2006 at 20:32:36 Pacific
OS: XP Sp 2
CPU/Ram: A64/2800+
Product: DFI LPUT NF 3
Comment:

hello
Currently, i have my apache webserver on my computer and i want to connect it to MySQL server on my friend's computer.
we are connected through LAN. how can i do it?

right now, i am using dummy database (MySQL) on my computer. i am connected to my own MySQL server by servlet using

Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con =DriverManager.getConnection("jdbc:mysql:///DataPool", "", "");

and i've tried to connect to my friend's MySQL server by using it's IP

Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con =DriverManager.getConnection("jdbc:mysql://10.0.0.8/DataPool", "", "");

but this didn't work.
can anyone give a solution of this matter? plz. i really need it.
Thx in advance.

Athlon 64 2800+ @ 2.63 Ghz Stock Cooling
Timings:2-3-2-5
V-Gen 512MB pc3200 x 2
DFI Lanparty UT NF3
Abit R9550 VGuru XTurbo
525Mhz/300Mhz



Sponsored Link
Ads by Google

Response Number 1
Name: Guy
Date: October 19, 2006 at 08:31:36 Pacific
Reply:

You probably need to specify the port that MySql is listening on. Usually 3306. So something like:

getConnection("jdbc:mysql://10.0.0.8:3306/DataPool",

I would verify that I had connectivity *outside* of Java/JDBC first. Use the 'mysql' command line utility to do that.

Are you also sure you don't need a user ID and password? That would be unusual.

Good luck, Guy


0

Response Number 2
Name: Fel
Date: October 19, 2006 at 11:00:56 Pacific
Reply:

nah, i have the userid and pass, but for security reasons, i prefered not to post it :)

thx Guy. i'll try it ASAP.

Athlon 64 2800+ @ 2.63 Ghz Stock Cooling
Timings:2-3-2-5
V-Gen 512MB pc3200 x 2
DFI Lanparty UT NF3
Abit R9550 VGuru XTurbo
525Mhz/300Mhz


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Dos, opening Directories ... Partial file name search



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: JSP & MySQL

Creating Website using JSP/MYSQL www.computing.net/answers/programming/creating-website-using-jspmysql/7227.html

If not JSP, then ? www.computing.net/answers/programming/if-not-jsp-then-/7501.html

JAVA/PHP database programming www.computing.net/answers/programming/javaphp-database-programming/6933.html