Connecting to MySQL through OpenOffice

Discussion in 'Linux' started by dragonbite, Apr 27, 2010.

  1. dragonbite

    dragonbite Well-Known Member

    Aug 30, 2008
    Likes Received:
    If you are like me, you take new projects as an opportunity to try new things.

    I have a project I'm working on right now developing a PHP web application (non-public facing) and connecting it to a MySQL database on the back-end for our annual church auction.

    One of the issues that I had was getting a list of items up for sale at the auction into the MySQL database without having to add each item individually.

    Being an ASP.NET developer with a MS SQL back-end, my first thought was connecting Access to the database and doing a simple copy-and-paste from the Excel file. When I tried to connect to the database in OpenOffice Base, though, it wasn't quite as easy. I kept getting a "driver not found" error.

    A quick Google for openoffice base to mysql let me to an OpenOffice wiki page that navigated me towards installing the necessary JDBC driver, appropriately titled Connect MySQL and Base.

    In essence, the steps are pretty easy
    1. Download the "mysql-connector-J" drivers from the mirror list at or the MySQL website
    2. extract it somewhere accessible, whether to you or to everybody on the system such as "/usr/local/jdbc". You can use Gnome File Roller, KDE's Ark or the #tar -zvf mysql-connector-java-x.x.x" command
    3. Open (any) OpenOffice, I used the word processor
    4. navigate to Tools > Options > (General) > Java
    5. Click on the button Class Path
    6. choose Add Archive
    7. navigate to where the mysql-connector-x.x.x-java-bin.jar file is located
    8. Click on Open, and the file should then appear in the list of Assigned folders and Archives.

    Then it may ask you to reboot your system. Once I did this I could take OpenOffice Base and connect to the database very simply.

Share This Page