May 11

0 comments

Install MySQL on IBM i

By NickLitten

May 11, 2022

IBM i, AS400, Install, iseries

MySQL on IBM i

It’s time to install MySQL on IBM i

Following Part 1 – where we downloaded the IBM i MySQL Installer – let’s dive into installing the actual thing and wade through any problems we see along the way. I have read on the IBM website that the MySQL IBM i binaries and the IBM i MySQL DB2 Storage Engine are available in the current version of the Zend Server Community Edition for IBM i product which is packaged with IBM i or can be downloaded from the Zend Web site…. but…. I’m going to try and install it standalone before trying the Zend Server route…

Me – with a coffee

Come with me on an IBM i MySQL Software Installing adventure…

Install the MYSQL on IBM i by executing the installation command:

ADDLIBLE LIB(MYSQLINST) 

INSMYSQL DIR('/usr/local') DATADIR('/QOpenSys/MySQL/data') USRPRF(MYSQL)                    

The three instillation parameters can be changed but I am sticking with defaults:

  • DIR(‘/usr/local’) sets the installation location for the MySQL files. This IFS directory will be created if it does not already exist.
  • DATADIR(‘/QOpenSys/mysal/data’) sets the location used to store the database files and binary logs. The selected is the same as the default: /QOpenSys/MySQL/data. This IFS directory will be created if it does not already exist.
  • USRPRF(MYSQL) sets the user profile that will own the files that are installed. The profile will be created if it does not already exist (but we created it earlier right?). It is created as disabled and cannot be used as a sign on profile.

ERROR ENCOUNTERED

Th problem I came across was the installer being unable to create the DATADIR(‘/QOpenSys/MySQL/data’). This turned out to be easy to solve — I created the subfolder manually and ran it again:

MD DIR('/QOpenSys')
MD DIR('/QOpenSys/MySQL')

When the install program works on the data from the MYSQLSAVF save file it creates an installation directory in “/usr/local” in the IFS called “/usr/local/mysql-5.0.90-i5os-power-64bit”

Install MySQL on IBM i

When you run the installation program, it switches to PASE and executes an install script. This had a problem for my install, but the nice thing is it’s easy to figure out and work around.

They say a picture paints a thousand words so come with me while we install MySQL on this IBM i System:

Install MySQL on IBM i

Your joblog should look something like this:

INSMYSQL DIR('/usr/local') DATADIR('/QOpenSys/MySQL/data') USRPRF(MYSQL)
User profile MYSQL already exists.
Owner changed for object /tmp/mysql_i5os_install.tar.
Security changes occurred for 1 objects.
1 objects restored. 0 objects not restored.
Owner changed for object /tmp/install.sh.
Security changes occurred for 1 objects.
1 objects restored. 0 objects not restored.
Command ended normally with exit status 0.
INSTALLATION SUCCESSFUL!

Verify the MySQL on IBM i Install

Seems obvious that we need to find out if this thing actually works.

Let’s take the plunge here


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Join the IBM i Community for FREE Presentations, Lessons, Hints and Tips

>