473,216 Members | 1,323 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,216 software developers and data experts.

Cannot connect to MySQL DB remotely

Ike
Through Java, I am attempting to connect to a MySQL 4.12 server on a remote
computer. I can connect fine via php. I cann connect fine via Java, through
a servlet, when the servlet is on the same machine (localhost) as the MySQL
DB.

However, when they are on different machines with different IPs, calling
across the Internet (and there are no firewall issues -- I can connect fine
to the remote MySQL DB via php from the same machine, not are there
connection issues, it is the same db name, password and username, just a
different IP) the MySQL driver is choking on me with the following stack
trace: (btw max_connections in the MySQL DB is set to 100)

java.sql.SQLException: Server connection failure during transaction.
Attempted reconnect 3 times. Giving up. at
com.mysql.jdbc.Connection.createNewIO(Connection.j ava:1704)
at com.mysql.jdbc.Connection.(Connection.java:491)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:346)
at java.sql.DriverManager.getConnection(DriverManager .java:525)
at java.sql.DriverManager.getConnection(DriverManager .java:171)

Does anyone have any idea why this would be happening? Ive been looking at
this for days and cannot gain any insight into my problem here. TIA, Ike
May 3 '06 #1
5 3812
Ike wrote:
java.sql.SQLException: Server connection failure during transaction.


What version of the MySQL JDBC driver are you using? Be sure to check
for extra copies of the mysql jar, lurking in jre/lib/ext and places
like that.

Also for future reference, my favorite diagnostic search is googling for
the error message:

http://www.google.com/search?q=mysql...transaction%22

This turns up many hits, with various solutions for the error.

Regards,
Bill K.
May 3 '06 #2
Ike

"Bill Karwin" <bi**@karwin.com> wrote in message
news:e3*********@enews4.newsguy.com...
Ike wrote:
java.sql.SQLException: Server connection failure during transaction.
What version of the MySQL JDBC driver are you using? Be sure to check
for extra copies of the mysql jar, lurking in jre/lib/ext and places
like that.

Also for future reference, my favorite diagnostic search is googling for
the error message:

http://www.google.com/search?q=mysql...ure+during+tra
nsaction%22
This turns up many hits, with various solutions for the error.

Regards,
Bill K.


Hi Bill,

I am using mysql-connector-java-3.1.7-bin.jar to connect to MySQL
4.1.12a-nt -- using the same Jar and MySQL versions for both cases (in the
one case, where the connection succeeds, and both are on the local machine,
and the failure one, where the DB is on a remote machine, but I can connect
via php from the same machine as the mysql-connector-java-3.1.7-bin.jar, but
NOT with mysql-connector-java-3.1.7-bin.jar)

Thanks, Ike
May 3 '06 #3
Ike
If I am trying to connect to, say http://64.233.244.105 I would specify my
connection url then as:

mysql://64.233.244.105:3306/mydatabasename

yes?
TIA, Ike
May 4 '06 #4
Ike wrote:
If I am trying to connect to, say http://64.233.244.105 I would specify my
connection url then as:

mysql://64.233.244.105:3306/mydatabasename


That should be "jdbc:mysql://64.233.244.105:3306/mydatabasename".

See http://dev.mysql.com/doc/refman/5.0/...roperties.html

Have you read any of the hits from the google search I referenced?
There seem to be a variety of possible causes for the "Server connection
failure during transaction" error.

Regards,
Bill K.
May 4 '06 #5
Ike

"Bill Karwin" <bi**@karwin.com> wrote in message
news:e3********@enews1.newsguy.com...
Ike wrote:
If I am trying to connect to, say http://64.233.244.105 I would specify my connection url then as:

mysql://64.233.244.105:3306/mydatabasename
That should be "jdbc:mysql://64.233.244.105:3306/mydatabasename".

See

http://dev.mysql.com/doc/refman/5.0/...roperties.html
Have you read any of the hits from the google search I referenced?
There seem to be a variety of possible causes for the "Server connection
failure during transaction" error.

Regards,
Bill K.


Thanks Bill -- sorry, my URL WAS correct, but I copy-pasted it to my post
incorrectly(!). Yes, I DID see the link you sent, and, tracked down every
single issue without success EXCEPT the issue that the connector version I
am using may be unable to connect to a remote DB (3.0.17). I am going to try
it with 3.0.8 later tonite. Thanks for your help!-Ike
May 5 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ryan Stewart | last post by:
I'm running MySQL server on a WinXP box at home. I have a cable modem/router. I've set up port forwarding on port 3306 to the machine running MySQL. I can connect locally just fine, but when I try...
3
by: Steven | last post by:
Hi All, I've installed MySQL 4.1.12 on my server, I can connect from the local machine with navicat, but not from a remote machine. I checked with 'nedstat' and there is something listening on...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
6
by: AP | last post by:
I have not seen any good examples on how to connect to a mySQL db. My website uses phpMyAdmin to administer the SQL databases. What confuses me is where are the databases that I create located? For...
3
by: pc | last post by:
hi everyone, I am trying to connect to a new mysql installation. I have given root permission to connect to all databases from anywhere; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY...
5
by: smatta | last post by:
I have just installed MySql version 5.0-18 on Red Hat Fedora Core 4. It is running but I cant connect to it using MySql Query Browser running on my pc. >From my pc, I can telnet to the sql...
2
by: zMisc | last post by:
I am using VB.NET 1.1 and cannot connect to a MySQL (v5) database. I've done the following: 1) Create a DSN for MyODBC. 2) Connect using: Driver=MySQL ODBC 3.51 Driver; Server=localhost; Data...
2
by: idorjee | last post by:
hi, can anyone tell me what am i doing wrong here. i'm trying to connect remotely to the MySQL database on a server (SunOS multivac 5.9 sparc SUNW,Sun-Fire-V240). i know that the username and the...
3
by: emsik1001 | last post by:
Hi http://dev.mysql.com/doc/query-browser/en/mysql-query-browser-connection.html I'm trying to connect from my Windows based PC to a dedicated server which is running on Linux system. I...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.