If you find these tutorials useful, Please consider making a donation.

TheFrugalComputerGuy.png
TheFrugalComputerLogo.png

LibreOffice Base Group 27

MySQL










Video 80 - Install MySQL

In this video we see how to install MySQL.



Over the next few videos, we are going to look at how to connect LibreOffice Base to a MySQL database. This video will show you the options I chose when installing MySQL on my computer.










Video 81 - Connect with ODBC

We see how to use the ODBC connector to connect LibreOffice Base to a MySQL Database

The first thing we do is delete the MySQL installer file (no-longer needed). Then open a Writer document to see if the MySQL connector extension is installed.

Where to download the LibreOffice MySQL connector extension is then shown as well as how to install it.

A new MySQL database is created using the MySQL server 5.6 Command Line Client.

A new LibreOffice Base database is created and connected to the new MySQL database using the ODBC connector.

Tables are created for the MySQL database using LibreOffice Base.

Data is entered into the MySQL tables from LibreOffice Base.

A relationship is created using LibreOffice Base

Forms are created using LibreOffice Base, and we see that Subforms do not appear to work for the ODBC connector, but simple forms do work.










Video 82 - Connect Directly with problem

We create another MySQL database and connect directly to the database. We are able to successfully create tables for this database, proving LibreOffice is connecting properly, but we can't view the tables, so we can't create any data for the tables or create any forms using LibreOffice. In the past, I have gotten this to work properly, on this computer, but for some reason, right now, I c annot view my tables.















Video 83 - Connect Directly

On a different computer, I connect directly to MySQL and we see how to create tables, add data, and create a form (with a subform) by connecting to MySQL directly.










Video 84 - Connect with JDBC

We see how to connect LibreOffice Base to a MySQL database using JDBC (Java Database Connectivity)

When we first attempt to connect LibreOffice to a MySQL database using the JDBC connector, we get the error The JDBC driver could not be loaded for com.mysql.jdbc.driver.

We see how to solve this problem by identifying the mysql-connector-java-5.1.34-bin.jar file, then in LibreOffice Tools, Advanced, Class Path, adding that folder and getting the proper file name into the open file area.

Having resolved the problem, we then go on with the same tests we did with the Direct and ODBC connections showing the Java connection seem to work best of the three connection types.










Video 85 - Multiple MySQL Users

We add Multiple users to MySQL and give different authority to each user.

First we add a user from the MySQL Command Line Client, this user can only view a specific table on a database.

Then we use the MySQL Workbench, Users and Permissions to add a MySQL user with full access to any database that starts with the first three letters of odb.

We add one more user using the MySQL Workbench, Users and Permissions to give a user the authority to view a specific database.