You are here

Connect OOo Portable 3.2.0 to MySQL Server

10 posts / 0 new
Last post
andymelton
Offline
Last seen: 13 years 3 months ago
Joined: 2010-12-14 21:34
Connect OOo Portable 3.2.0 to MySQL Server

I have been trying to use Base to connect to a local MySQL server. I installed JavaPortable. When you go to Tools > Options > Java, Use a Java runtime environment is selected and under Java runtime environments (JRE) already installed: there is a listing for Sun Microsystems Inc. version 1.6.0_22. I've been reading through the forums and other websites and can't make sense of what I am suppose to do to connect to the database. My last look into resolving this I came across an article that suggested I download a JDBC driver for MySQL. I did download the driver but I am not sure where to plug it into OpenOffice.

When I try to authenticate to the database I get the following error message:

The driver class 'com.mysql.jdbc.Driver' could not be loaded
com/mysql/jdbc/Driver

If I have left any information out please forgive me, I'm not sure of what else I need to include. Thank you!

dacm
Offline
Last seen: 13 years 3 months ago
Joined: 2010-02-18 20:44
hmmm...

hmmm...

andymelton
Offline
Last seen: 13 years 3 months ago
Joined: 2010-12-14 21:34
Still trying to resolve this issue

I somehow managed to get Base connected to the MySQL server. I say somehow because I couldn't tell you the steps I took to get it to work. I can tell you that I followed the instructions of a text file in the OpenOffice Portable > Java folder to portablize a local installation of Java. Unfortunately, this only worked for a little while. After I closed OpenOffice.org Portable and came back to it later I could not get it to work again. Same issues as described above.

I think everything should be portable!

Darkbee
Darkbee's picture
Offline
Last seen: 3 years 10 months ago
Joined: 2008-04-14 09:41
Purpose

What is your ultimate goal? Are you trying to create reports from the data? Or are you trying to export the data and get into an OO Base database?

andymelton
Offline
Last seen: 13 years 3 months ago
Joined: 2010-12-14 21:34
Just testing

Honestly, I am new to Base. I've always installed it, but have never used it. I figured it was time to play with it and see what I could do with it. I work with PHP and MySQL and thought maybe I could have a web component as well as a Base component to generate reports or enter data. Basically, my ultimate goal is to expand my knowledge of OpenOffice (to be able to offer open source alternatives to clients). I've only used Writer and Impress since I fell in love with OOo in 2004.

I think everything should be portable!

Darkbee
Darkbee's picture
Offline
Last seen: 3 years 10 months ago
Joined: 2008-04-14 09:41
Oh I See

Oh well in that case with all due respect, why not just leave well alone (with regard to Base and MySQL)? You're better off just creating a database from scratch and playing with it directly in Base. I would imagine there are far better tools for managing MySQL databases like Database Browser Portable for example.

Your idea makes sense, I understand it, but why make it harder for yourself? It sounds like you haven't learned much in the way of Base at all currently, other than it's a pain to connect to MySQL. :| Mission unaccomplished Sad

I don't want to be a negative Nancy and try to dissuade you from what you're trying to do, but it would seem at this rate you're going to spend more time trying to get the two to play nicely together than you are learn Base. My only helpful suggestion if you want to continue to pursue this would be to try to the OpenOffice forums (assuming you haven't already). I also assume that you read the OpenOfficePortable support page. There is a section about running Java with it, although I don't know if this is up-to-date (I assume so).

andymelton
Offline
Last seen: 13 years 3 months ago
Joined: 2010-12-14 21:34
You're probably right

There are definitely better tools out there to manage MySQL databases. I've used a lot of them. I am actually partial to CocoaMySQL (a Mac application).

You are correct in assuming that I haven't learned a lot about Base. I think what I should do is drop the notion of trying to connect my MySQL database to Base for the moment and just use Base as a standalone database. Learn all I can and then go back to trying to connect Base to the server, if I decide it is even necessary. The only reason I think it would be useful to do so is to have the database centralized.

Thanks for your thoughts and suggestions! They are greatly appreciated.

I think everything should be portable!

andymelton
Offline
Last seen: 13 years 3 months ago
Joined: 2010-12-14 21:34
It connects, sometimes.

I just got Base connected to my MySQL database. I opened OpenOffice.org Portable, went to Tools > Options > Java and clicked on the JRE on the portable drive. Added the driver. This time OOo did not ask for a restart. I have found that if OOo asks me to restart when I add the driver it will not work after restarting. If it doesn't ask me to restart I can open the database file and connect to the database. The trouble is I will have to do this again after I close OOo and come back later. It will then probably ask me to restart.

I think everything should be portable!

Darkbee
Darkbee's picture
Offline
Last seen: 3 years 10 months ago
Joined: 2008-04-14 09:41
Configuration

What do you mean by "install the driver" specifically? Is there literally an installer process for the JDBC driver? Or do you simply meant that you have to hook it up to OpenOffice somehow? You should only have to install it once on the host machine, so if you have to keep installing it then it must mean that OpenOffice doesn't recognize it's presence.

I guess you should clarify your exact setup:
OpenOfficePortable?
JavaPortable?
JDBC driver (presumably non-portable)

I wonder if JavaPortable and JDBC don't play nice, so the problem isn't really OpenOffice at all.

Anyway, like I said, my personal advice would be to learn Base first since that seems to be your major objective, then you can waste hours of your life getting it to work with MySQL later. Wink

dacm
Offline
Last seen: 13 years 3 months ago
Joined: 2010-02-18 20:44
There is a fix

I'm sorry I posted "Hmmm..." above but I didn't have time to answer your question until now...

For now, the portable installer destroys your database connection settings each time you open OpenOffice Portable. We may have a fix whenever a new version of OOP becomes available.
https://portableapps.com/node/22809#comment-145117

However, in the meantime, there's a nice and permanent workaround that involves a file in your 'PortableApps\OpenOfficePortable\App\openoffice\Basis\program' folder named 'fundamentalbasis.ini'. We've incorporated the fix when running HSQLDB externally, but the original idea came from this genius who happened to be using MySQL as well:
http://user.services.openoffice.org/en/forum/viewtopic.php?p=121818&sid=...

This fix allowed us to provide automated installers for HSQLDB with Base:
http://user.services.openoffice.org/en/forum/viewtopic.php?p=162653#p162653
http://user.services.openoffice.org/en/forum/viewtopic.php?p=166469#p166469

So if you store your .jar file in the 'classes' folder within OOP you change this line in 'fundamentalbasis.ini':
URE_MORE_JAVA_CLASSPATH_URLS=

to this:
URE_MORE_JAVA_CLASSPATH_URLS=${BRAND_BASE_DIR}/Basis/program/classes/mysql-connector-java-5.1.11-bin.jar

Please remove the 'Class Path' settings in OOP and restart. Exit Quickstarter if applicable in the Task bar. Once OpenOffice.org is fully shutdown, these new settings will take effect. This is also effective with forks such as LibreOffice.

Log in or register to post comments