OpenOffice 3.0.1, JDBC, MySQL and Base
Has anyone successfully gotten OpenOffice 3.0.1 connected to an existing MySQL data base (and, gee, how'd you do it)? This is a full installation of Slackware 12.2 (with all the patches applied).
I have installed mysql-connector-java-5.1.7-bin.jar and it reports that it loads successfully, the CLASSPATH environment variable is set, the data base exists and I can access it and do whatever I want with the command line interface. I've read everything I can find about OpenOffice, MySQL and Base and followed step-by-step with not luck. Any hints? |
I didn't have much luck with the jdbc driver either. I installed the ODBC driver instead and that works without a problem.
|
Thanks for the information -- so, I went to http://www.slacky.eu, got the package, built and installed it and... uh, I'm a little lost (even after reading all the unixodbc stuff). I'd appreciate a little nudge in the right direction if you could, with thanks.
|
There's a configuration file somewhere in /etc/ that you have to modify. That file should contain the information for connecting to the database. I'm not sure what the file is called. I don't have access to my own linux computer at the moment, so I can't look it up. When I get home this evening I will have a look and post some more information here.
|
If you can, I'd really appreciate seeing what your /etc/odbc.ini and /etc/odbcinst.ini files look like; trying to follow the MySQL documentation and the unixODBC documentation has gotten me, pretty much, completely confused. I have installed mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz so the MySQL libraries are there but after that I'm lost. Thanks again for your help.
|
Not sure if this is at all relevant. I have done some programming using java to access the MySql database. All it involves is having the mysql-connector.jar file in jre/lib/ext. Never tried OpenOffice with it though
|
Hi.
I'm a bit later with my response then I said I would be, but I was rather busy yesterday. But here it is: My odbcinst.ini is entirely empty. My odbc.ini contains the following: Code:
[ODBC Data Sources] @arubin I gave your hint a try, but it still doesn't work with the jdbc driver. The driver does load according OOo, but when I try to test the connection I get an SQL syntax error. |
There is a configuration tool called ODBCConfig included with unixODBC.
Brian |
Hi, Broxtor,
Thank you for the listing of odbc.ini; that goes a ways toward figuring out just what's what with this software (never messed with ODBC before). By the way, the ODBCConfig utility will not work with Slackware 12.2 and qt-3.3.8b-i486-2 (the 12.2 distribution version); the files odbcinstQ.exp and SQLManageDataSources.cpp in the odbcinstQ directory in version unixodbc-2.2.14-i486-1 (the current version) must be edited or replaced with new ones (this per Nick Gorham, the developer) and the package rebuilt. I did this with src2pkg and the ODBCConfig utility now works (it was reporting /usr/lib/libodbcinstQ.so: undefined symbol ODBCManageDataSources). The changes, are (odbcinstQ.exp) Code:
QTSQLManageDataSources Code:
/************************************************** Thanks again! Thomas |
Well I have now got home to my PC and successfully connected with OpenOffice Base to a MySql database without touching any ini file
|
Step by step procedure using the database wizard:
Choose connect to an existing database Select MySql Next. Select using JDBC Next Enter name of database For server URL enter a space Next Enter username. Tick password required Next Choose whatever Finish Enter the password I use for MySql |
Thank you for the information; however, well, it doesn't work (it fails with "communications link failure") though I can connect with ODBC drivers with no problem.
I'm using mysql-connector-java-5.1.7-bin.jar with openoffice.org-3.0.1_en_US-i586-1_rlw (the one from Robby Workman). I have tried localhost, a space, the address, "me"@localhost and every combination of ingredients I can think of with the same result. Sigh. Thanks for your help. |
My set up is Slackware Open Office from slackbuilds with jdk-6u11-i586-1.tgz off slackware extras installed and mysql-connector-java-3.1.12-bin.jar in lib/ext/ (not /jre/lib/ext as I wrote earlier. I don't know if that makes a diiference)
|
Indeed it does make a difference. The connector must be in /usr/lib/java/lib/ext, not as previously stated
|
I have just written a short java program which should test whether your java mysql connection is working. I can email it to you if you want.
|
All times are GMT -5. The time now is 03:47 PM. |