Connect LibreOffice Base to MySQL
I think LibreOffice Base has so much underutilized potential as a rapid application development platform, business intelligence platform and just a general reporting platform. Not to mention the fact that registered data objects can be used in all of the other LibreOffice applications to make really amazing documents and improve the work-flow of any office. Anyone who has actually used MS Access knows how powerful it can be used to be for these types of purposes. The most recent version of Access seems to have lost a lot of the features that made it useful. This is okay since most power-users are still using Access 2003. LibreOffice Base is not nearly as powerful as Access, specifically from a usability perspective. My biggest frustration with getting started with LibreOffice Base is the obscure and somewhat cryptic documentation around the platform that makes way too many assumptions about what someone new to LibreOffice actually knows. My hope is to provide some practical tutorials with real world use cases. So let’s get started by connecting Base to an existing MySQL database. In my opinion, the built in HSQL engine has a somewhat weird syntax and is generally not worth learning unless you are not planning on ever actually writing any SQL and only using the built in wizards. I would prefer to work with MySQL databases because they are ubiquitous, use a “standard” syntax and very powerful. In addition most practical office use cases will involve a central database and not a local database.
Preparing Your MySQL Server
This is the part of the documentation that I find most obscure and confusing, so here is how to do it using LibreOffice 4.3 running on Ubuntu 14.04 LTS. The steps here will be slightly different depending on if you are developing on a local database or a remote database. If you are using a local MySQL database please feel free to skip this section. I do most of my database development inside of Linux Containers which essentially makes my databases “remote”. In order to allow remote connections we need to make a few changes to the default MySQL configuration. Please note that if you are doing these steps on a live production system you will need to be extra careful with users, permissions, ports that are opened, etc.. This falls outside of the scope of this tutorial but the rule of thumb is that if your database accepts connections from the outside world you should white list each IP address that will be connecting to it and block all others. The easiest way to do this in my opinion is with your firewall. By default MySQL only runs on the local host and is not accessible from remote hosts. To change this setting you need to edit the my.cnf file. 1) Open up my.cnf which is found in /etc/mysql/my.cnf 2) Find the bind-address and change if from the local host to the IP address of the server.bind-address 10.0.1.303) Restart MySQL
sudo service mysql restart
Install the MySQL JDBC Driver
On Ubuntu 14.04 this is very easy and can be done by running the following command:sudo apt-get install libmysql-java
Configure the Class Path in LibreOffice
Open up any LibreOffice App and go to Tools -> Options On the right hand side navigate to LibreOffice -> Advanced Select on the Class Path…button and load the new driver that was installed in the previous step. In order to do this you will need to select Add Archive… and select /usr/share/java/mysql.jar Once this has been loaded restart LibreOfficeConnect to your Database
Now comes the fun part. Now that we have taken care of all of the previous steps the rest is easy. To connect to your database open up LibreOffice Base.- In the Database Wizard select Connect an existing database and chose the MySQL option from the dropdown menu.
- Select Connect using JDBC and hit next
- Enter the database name, server IP, port number and select next
- Enter the username for an existing user in your database and select next
- If you wish to use this database in other LibreOffice applications you should select the Yes, register the database for me radio button.
- Select Finish
Thank you for reading! Share your thoughts with me on bluesky, mastodon, or via email.
Check out some more stuff to read down below.
Most popular posts this month
- One Year of Foxglove
- SQLite DB Migrations with PRAGMA user_version
- Lev Lazinskiy
- Microblog
- Vagrant Box for ROS2 on Apple Silicon
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- The contagion of fear from The Observation Deck
- The revolt of the reader from The Observation Deck
- Deeper dive: Were Touch Bar’s problems software rather than hardware? from Unsung
- Joining Cursor from Fatih Arslan
- Pluralistic: Digital sewer socialism (08 Aug 2026) from Pluralistic: Daily links from Cory Doctorow
- Pluralistic: Enshittification and Reverse Centaurs go global (29 Jul 2026) from Pluralistic: Daily links from Cory Doctorow
- AI Mania Is Eviscerating Global Decision-Making from Ludicity
- The default person from https://popagandhi.com/
Articles from blogs I follow around the net
“Insert your favorite nursery rhyme.”
Make Some Noise is one of many fantastic improv comedy shows on Dropout. I noticed one of the ongoing themes is “tech gone bad,” so I compiled a short list below. I just find these really funny. Video call with shitty wifi: Logging in with 30-factor authen...
via Unsung September 17, 2026Why are short videos bad for learning?
An essay version of the video is below – not just a transcript but a text that I’ve rewritten thoroughly to work as text. As is an audio version. You can subscribe to the audio-only unlisted podcast feed here if audio is more your speed. Overview # In this...
via Baldur Bjarnason's Notes on the Web September 17, 2026Why we should be very worried about the Hugging Face hack
(Note: This is a re-run of a piece I published on September 3rd. I am backwoods camping this week in the Canadian wilderness and will have no signal so please excuse me for the repeat!)About a month ago, I (and many others) wrote about an incident in which
via The Torment Nexus September 17, 2026Generated by openring