It’s time to install MariaDB on IBM i
Following Part 1 – let’s dive into installing the actual thing and wade through any problems we see along the way. …Me – with a coffee
MariaDB is a replacement for MySQL
MariaDB is a fast, open-source, community developed branch of MySQL. Internal commands use the MySQL Naming convention. It’s a nice IBM-i friendly alternative to MySQL, and the bonus is that installing MariaDB Using Access Client Solutions is super easy.
Open Client Access Solutions
Click on the Open Source Package Management menu option, under the Management Tab:
Click the Available Packages heading tab and scroll down to select
- MaariaDB Server
Now click INSTALL
You will see a status window showing the IBM i Install of MariaDB in progress:
MariaDB on IBM i is now installed!
If you want to look at what you have just download as an Open Source IBM i Package, you click the information and show files buttons in ACS to poke around and get familiar with what you have just installed:
Recognizing the danger of stating the obvious – don’t forget that IBM i MariaDB database names are case-sensitive
Now it’s time to setup and configure MariaDB.
Configure MariaDB on IBM i
Pause for one second, grab a cup of coffee, this is the point where I went down a rabbit hole of SSH Terminals, Bash Scripts and other unfamiliar nonsense for us old-fashioned AS400 chaps. Essentially, I learned that SSH (or Bash which is a terminal editor for SSH) is a scripting command line. Don’t panic! If you are familiar with using FTP, or even DOS Batch, then it won’t be too scary. So, let’s step through this slowly…Me. On the second coffee and starting to come down from the precipice of technical doom
SSH (secure shell) is a network protocol, allowing you to connect to remote systems securely.
If we look at the IFS location for MariaDB – /QOpenSys/pkgs/bin – we can see a bunch of scripts, executables, that can be run from within your Secure Shell Session.
SSH? IFS? Bash? Too many buzzwords?
Rather confusingly, the term SSH is also to mean any program which uses SSH protocol to connect to a remote computer. Once connected, SSH lets you run commands on your host and see the output on your local terminal.
- BSH (The Bourne Shell) is a shell program giving you a command line interface to the operating system. Bash is also a programming language used to write shell scripts.
- BASH (The Bourne Again Shell) is a newer version, with lots of enhancements.
- PuTTY is a Windows based program which provides an ssh session to your IBM i Server. There are other alternatives, so make your choice.
You can install a SHELL editor session on your PC – it seems a lot of people like to use PuTTY for this – but for this MariaDB install we are going to stick with the good old IBM i SSH Terminal from the green screen (or in my case a kind of white screen):
We can list the files in the 5250 terminal using the good old WRKLNK command to show us what is in the IFS folder:
If we want to execute some of these scripts, then we can use a Secure Shell Session – in the same way that you can launch Java scripts.
IBM i comes with a rudimentary Secure Shell Session called QSH
Start QSH to use the IBM i SHELL EDITOR:
and then enter the folder name to goto the folder and ls to list the files
Wow! MariaDB (MySQL) is now installed on your IBM i System
Let’s dive into some database configuration and get this thing running: