Home arrow static arrow Java Programming [Archive] - MySQL and Java
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - MySQL and Java
This topic has 3 replies on 1 page.

Posts:307
Registered: 10/2/03
MySQL and Java  
Jul 23, 2004 2:30 AM



 
I am writing a java application that connects to a mySQL database. The problem is that I am getting connection refused exceptions. I know my code is correct. I was wondering that maybe I need to use a different JDBC driver because the server runs on RedHat Linux.
Any help would be appreciated
 

Posts:964
Registered: 7/23/03
Re: MySQL and Java  
Jul 23, 2004 2:53 AM (reply 1 of 3)



 
are you running the mysql server on the same machine ?
if not, then you may need to configure a new user with the host name where you run your java program...
mysql default configuration only accept connection locally....
 

Posts:307
Registered: 10/2/03
Re: MySQL and Java  
Jul 23, 2004 3:18 AM (reply 2 of 3)



 
No the Database is on a Remote server. The problem is that I even uploaded the applet on the server but still I can't establish a connection. I am using the default port 3306. Do I need to install the JDBC drivers on the Linux server as well? I couldn't find any decent tutorial for trying to connect with MySQL when its running on a remote machine. Any help?
 

Posts:88
Registered: 6/10/01
Re: MySQL and Java  
Jul 23, 2004 4:13 AM (reply 3 of 3)



 
You don't have to install the drivers on the server. You should try to make a connection from your computer to the server using something other than java, for example the mysql tool. I bet you will get an error there as well. If that is the case, check your security settings on the server.
 
This topic has 3 replies on 1 page.