Communications link failure.

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
john_galt
Posts: 2
Joined: Thu May 21, 2009 9:35 pm

Communications link failure.

Post by john_galt »

I'm having difficulty connecting to a remote mysql server.

I have verified connectivity, and that the remote server is accepting requests from my client station. The problem is in setting up my connection in OO Database.

From a terminal window, I can connect to the remote server with "mysql --user=me --password=mypassword --host=mysql.somewhere.net" (not the actual names, but the ones I'm using work). That brings up the mysql client and I can "SHOW DATABASES;" "USE somedatabase;" and generally everything works. Just pointing this out up front so that anyone who starts out "your server is misconfigured" understands that all evidence points to the server working properly. This client station can connect to the database server. The server replies as expected. It's OpenOffice Database with JDBC that isn't working.

Here's what I'm doing. Perhaps someone can point out my error:

When I open OpenOffice database, I get the database wizard. First window: "Welcome to the OpenOffice.org Database Wizard ... What do you want to do ..." I select the bottom choice, "Connect to an existing database" and "mysql" on the drop down selction.

That takes me to step 2, "Set up MySQL connection." I select "Connect using JDBC" on that window.

Next, the wizard takes me to "Set up connection to a MySQL database using JDBC." I have 4 fields to fill in on that window:
Name of the database: mydatabase (changed, but it's one I can "USE" with the terminal mysql client on this station.)
Server URL: jdbc:3306//mysql.somewhere.net (again, it's the domain name that works from the terminal mode mysql client.)
Port: 3306
JDBC driver class: com.mysql.jdbc.Driver

When I press the "Test Class" button, it says the JDBC driver was loaded successfully.

Pressing the "Next" button brings up the "Set up user authentication" window. I type in "me" for my username (the name that works from the terminal mode mysqlclient), and check the password box. When I press the "Test Connection" button, it prompts for my password. When I give the correct password (cut and paste from where I put it on the command line in the terminal, so I know it's right), I get "Communications Link Failure" ... "Last Packet sent to the server was 0ms ago."

I'm stuck. What's the proper incantation? What have I misspelled? Mispunctuated? Or filled out wrong?

If it matters, I'm using OpenOffice 3.0.1 (build 9379) on Ubuntu Linux 9.04. I'm up to date on all updates.
OOo 3.0.X on Ubuntu 8.x + you name it
john_galt
Posts: 2
Joined: Thu May 21, 2009 9:35 pm

Re: Communications link failure.

Post by john_galt »

A quick update further. I've installed the Sun Java runtime environment, but I did it with "apt-get install sun-java6-jre"

I'm not using the gnu Java, I'm using the Sun Java.
  • $ sudo dpkg -l | grep java
    ii java-common 0.30ubuntu4 Base of all Java packages
    ii libhsqldb-java 1.8.0.10-1ubuntu1 Java SQL database engine
    ii libmysql-java 5.1.6+dfsg-1ubuntu2 Java database (JDBC) driver for MySQL
    ii libservlet2.4-java 5.0.30-8ubuntu3 Servlet 2.4 and JSP 2.0 Java library.
    ii openoffice.org-java-common 1:3.0.1-9ubuntu3 full-featured office productivity suite -- arch-independent Java
    ii sun-java6-bin 6-13-1 Sun Java(TM) Runtime Environment (JRE) 6 (architecture dependent
    ii sun-java6-jre 6-13-1 Sun Java(TM) Runtime Environment (JRE) 6 (architecture independe
    ii sun-java6-plugin 6-13-1 The Java(TM) Plug-in, Java SE 6
OOo 3.0.X on Ubuntu 8.x + you name it
garry_m
Posts: 1
Joined: Tue Oct 06, 2009 9:41 pm

Re: Communications link failure.

Post by garry_m »

Try using the JDBC connector and the following string.

mysql://<IP ADDRESS>/<DBASE_NAME>?autoReconnect=true

I have found with servers with very short wait_timeouts set, that the only way to maintain a persistent connection is with this config. Its supposed to be set in the JAR connector, but I find that unless its set in the Open Office setup it will drop the connection. When entering data you may get a timeout warning but click OK and then resend the data and it will work just fine.

Note this set up will crash NeoOffice if you get the timeout warning.
OpenOffice 3.1.1 On Ubuntu 9.04
martijn_v
Posts: 15
Joined: Tue Jul 20, 2010 12:26 pm

Re: Communications link failure.

Post by martijn_v »

Excuse me for re-opening this thread, but I have a similar problem.
garry_m wrote:Try using the JDBC connector and the following string.

mysql://<IP ADDRESS>/<DBASE_NAME>?autoReconnect=true

I have found with servers with very short wait_timeouts set, that the only way to maintain a persistent connection is with this config. Its supposed to be set in the JAR connector, but I find that unless its set in the Open Office setup it will drop the connection. When entering data you may get a timeout warning but click OK and then resend the data and it will work just fine.
What I would like to know is: where do I set this string in OpenOffice setup?

Thanks in advance for any help.

Regards,

Martijn
OpenOffice 3.2 on Windows XP and Ubuntu 10.04
martijn_v
Posts: 15
Joined: Tue Jul 20, 2010 12:26 pm

Re: Communications link failure.

Post by martijn_v »

Ah, I found it myself. I used to select "MySQL (JBDC)" as the datatype, but I have to use "JBDC" instead. That allows me to provide a full Data Source URL, instead of just a hostname.
OpenOffice 3.2 on Windows XP and Ubuntu 10.04
Post Reply