Hi
I’m on a laptop running Linux Mint 19.3 and LibreOffice 7.3.4.2
and on a desktop running Linux Mint 19.3 and LibreOffice 7.3.3.2
and I’m using LibreOffice Base connecting to a mariadb database.
I’m working on a hobby project and started out setting up an embedded hsqldb database and then an older version of the hsqldb split database and then updated to hsqldb 2.3.2 not too long ago.
I decided to try to set up mysql in a server relationship (and then decided on mariadb) to learn about connecting to the database myself (rather than let the split database wizard take care of it for me) and to learn setting up multiple users.
I have a connection now using a mysql connector, but I was having some problems getting there and wanted to see whether anyone can tell whether I am doing something wrong.
I read posts that talked about opening a libreoffice file (I chose writer) going to the tools and options and advanced selections and selecting the “class path” button on the right, then choosing “add archive” from the box that comes up and navigating to the location of the connectors in the window that comes up.
Prior to that I had used the file manager and located the jar files for the connectors at /usr/share/java/ but in the window I had gotten to above from libreoffice for selecting archives, when I navigate to the /usr/share/ contents it doesn’t even show a java folder that I could open to look for the jar files.
I ended up copying both my mysql and mariadb jar files and pasting a copy on my desktop folder. After doing that, I could find both of those through the libreoffice process of adding an archive to the class path that I mentioned above.
After doing that, when I opened LO Base and chose to connect to an existing database (which I created in mariadb through the command line and named picturemgt) and selected mysql from the dropdown list and next selected the connect using JDBC option and next entered my database name and localhost for the server and the default port of 3306,
I pushed the test class button using the default that was in the box saying com.mysql.jdbc.Driver and also using org.mariadb.jdbc.Driver. In both cases it told me that the JDBC driver was loaded successfully.
When I next enter my mariadb username and password and test the connection, I only get a successful connection with the mysql driver.
Lastly before the questions, even after getting a local connection on the computer where I have the mariadb files, I couldn’t make a connection from my laptop to the desktop computer with either connector. I found out that by default mariadb listens only on 127.0.0.1 so I made some changes. So where I said above that I originally was testing the connection with the server named as localhost, I currently have the desktop computer’s IP address in the server field and asked mariadb to listen for that IP address as well as the IP address for my laptop and I have a working connection from my laptop. I think there was also some tweaking with the ufw firewall.
So I’m wondering:
- why couldn’t I get to the /usr/share/java/mysql-… and mariadb-… jars through the libreoffice process
- where should those jar files go if not in /usr/share/java/
- even though I have (or libreoffice has) a working connection through the mysql connector, is there something else I should have done differently to get the mariadb connector to work
- the computer where my new database lives had an installation of mysql from four or five years ago and the java folder had an existing connector that I first copied onto my desktop to try and connect with. It was 5.1.45. I realized that 8.0.29 is a more current version and downloaded that and also copied it to my desktop folder so that I could point libreoffice to it. How do I know which com.mysql.jdbc.Driver is being used?
Any thoughts or suggestions?