473,382 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

WAMP MySQL Database access in java code

I have a public IP system. In that I have installed WAMP. And I have written a java code to establish jdbc connection with the mysql installed in the public ip system.

My Database connection fails miserably,

Connection con = DriverManager
.getConnection("jdbc:mysql://localhost/Test123","usr","123");


If my public ip is example.com, can i try
Connection con = DriverManager
.getConnection("jdbc:mysql://example.com/Test123","usr","123");

Even this fails.

My main problem is I don't know how to establish connection using java code with WAMP MYSQL Database in public ip system.

Please help me!!
Jan 1 '12 #1
1 7235
johny10151981
1,059 1GB
please follow the example found on link

And about connecting from any host read the link

one more this is your mysql server only allow those client that has permission to connect with your mysql server.
Jan 4 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: mdh | last post by:
I am trying to learn the basics of MVC applications using a Tomcat infrastructure. I'm starting by building a simple application with: * a login.jsp page for a basic login form with a action...
3
by: Brendan | last post by:
Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve) CAN ANYONE HELP?? What is causing this...
2
by: Stephen E. Weber | last post by:
I have an access database with an "item number" and a filespec for a JPG with the image for the item and a filespec for a HTM document with the description and specifications. I use a List Box and...
21
by: ding | last post by:
I am facing problem to writting file to MySQL database in java application. Can show me a example code? Thanks!
2
by: mannavavp | last post by:
hi friends, please let me know how i can store audio files in database table using java programming?
2
by: ashi1290 | last post by:
im getting exception message is null ... whwni print the stack trace its says something like this....... ResultSet rs;int i=-1; PreparedStatement ps; Class.forName("com.mysql.jdbc.Driver");...
2
by: jitendrawel | last post by:
how can be import excel file in mysql database through PHP code. Please send me complete code ASAP. Thanks. Best regards, Jitendra Kumar
1
by: NewJavaProgrammer | last post by:
Hi Can someone please take me through how to make a connection to a MySQL database using Java in Netbeans. I have downloaded the driver from MySQL, unzipped it to my location, and added the...
3
by: Abdulrhman | last post by:
Hi I want to ask about how to copy database as it is to a new database by Java code. I mean to copy the database all at once by one code, not table by table. Thanks in advance.
1
by: Amit yadav2010 | last post by:
I am using java and mysql database and i want to know how to store video in mysql? If anyone know the solution of it. Please let me know it.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.