[CentOS] Re: SSH, SCP connections to remote MySQL Database using OpenOffice Possible?

Jim Perrin jperrin at gmail.com
Wed Mar 12 02:24:27 UTC 2008


On Tue, Mar 11, 2008 at 11:51 AM, Therese Trudeau <mswotr at hotmail.com> wrote:
>  Now why didn't I think of that?!?  I will and if I find a solution I'll post it on this thread thanks.

I'm ignoring the OT bits of this because for some reason this made me
curious. Here are the findings. It *is* possible to do this with the
OOo Calc in centos, but it takes a bit of muscle to get working.

The default ODBC drivers from the unixODBC package don't work. Period.

The jdbc driver will work, however it doesn't come by default, and
seems to require Sun java (easiest by installing the jdk rpm from
java.sun.com, then installing the sun-compat-java package from
jpackage.org)

You can get the  mysql-connector-java-5.0.8-1jpp package from
jpackage.org, and this is the easy part. This package requires log4j,
which is in the centos base repo so you'll need to install this as
well. You'll also need jta, which unfortunately is non-free, and only
available as an srpm from jpackage ( in the 1.6 non-free tree. I
haven't seen it appear yet in 1.7).

This next bit assumes some minimal familiarity with building rpms.
You'll have to change the cvs_version string from 1_0_1_B to 1_1 in
the jta spec file, and download the jta class package from
http://java.sun.com/products/jta/

I didn't bother to fix the documentation related portion of the spec,
but rather cheated and built the rpm with '--without javadoc'

After you have sun java, jta, log4j, and the mysql-connector-java
package installed, log out & log in again. This should put the sun
java bits into your openoffice discovered path. We'll see here in a
minute anyway.

Open up OOo calc, and go to Tools, then Options. Select the java menu
item on the left.
Make sure the sun java package appears in the list. Make sure the box
at the top for 'use java' is checked, and make sure sun java is
selected. Then choose 'Class Path', then 'Add archive'. Add the path
'/usr/share/java/mysql-connector-java.jar'

Now save and exit. It'll tell you that you have to restart OOo Calc,
and that's BS. You actually have to log out and log back in again for
some insane reason I have yet to discover. This time around you should
actually be able to connect to your database by selecting MySQL from
the list, and jdbc as the connection type. This works with and without
the ssh tunnel in testing here.





-- 
During times of universal deceit, telling the truth becomes a revolutionary act.
George Orwell



More information about the CentOS mailing list