p. MySQL is an open source database that has gained popularity in the web application world and is used in most of the leading/hot PHP (Hypertext Pre Processor) applications. Now that System i is a supported hardware platform for PHP with the availability of Zend Core for i5/OS, we have documented instructions for downloading, installing and running MySQL in the Portable Application Solution Environment (PASE) on the System i. MySQL is not an IBM i5/OS supported environment, use accordingly.
p. If you are an ISV interested in running your PHP application on System i please contact email@example.com or firstname.lastname@example.org. We would like to work with you.
p. This example was created by interpreting the instructions on www.mysql.com for the PASE environment on the System i.
p. 1. Create user profile mysql. It is a disabled id so it can not be used to sign on to the i5 system but it can be used by MySQL.
CRTUSRPRF USRPRF(MYSQL) STATUS(*DISABLED) TEXT('MySQL user id')
p. 2. Go to www.mysql.com and download the AIX 5.1 (POWER 64-bit) version of MySQL 5.0 to the PC. mysql-standard-5.0.21-aix5.2-powerpc-64bit.tar.gz is the name of the file.
p. 3. Use a zip utility to unzip mysql-standard-5.0.21-aix5.2-powerpc-64bit.tar.gz creating mysql-standard-5.0.21-aix5.2-powerpc-64bit.tar
p. 4. Copy the mysql-standard-5.0.21-aix5.2-powerpc-64bit into the IFS. In this example it is copied to \usr\local
p. 5. Logon to the System i using the QSECOFR user id
p. 6. Enter the PASE environment using call qp2term
p. 7. Change the directory to usr/local cd usr/local/
p. 8. Untar mysql-standard-5.0.21-aix5.2-powerpc-64bit.tar tar -xvf mysql-standard-5.0.21-aix5.2-powerpc-64bit.tar
p. 9. Create a symbolic link ln -s mysql-standard-5.0.21-aix5.2-powerpc-64bit mysql
p. 10. Create the MySQL grant tables. Change directories to mysql cd mysql and then run the command scripts/mysql_install_db –user=mysql
p. 11. Once MySQL has been installed follow the Unix Post-Installation Procedures
p. 12. Start & Stop MySQL
* Start the MySQL server: bin/mysqld_safe –user=mysql &
* Stop MySQL server bin/mysqladmin -u root shutdown
p. 13. Other useful commands for verifying the install are:
* bin/mysqladmin version
* bin/mysqladmin variables
* Simple tests to verify that you can retrieve information from the server:
* bin/mysqlshow mysql
h2. Other Topics:
USERS and AUTHORITIES
- GLOBAL: GRANT ALL PRIVILEGES ON *.* TO 'wfusr'@'%' IDENTIFIED BY 'wfpass' WITH GRANT OPTION;
(refer to MySQL documentation)
- SCHEMA: GRANT ALL PRIVILEGES ON workflow.* TO 'wfusr'@'%' IDENTIFIED BY 'wfpass' WITH GRANT OPTION;
(refer to MySQL documentation)
- Sample CL program to start MySql in QBATCH subsystem
- Sample PHP app to take user input, write to MySQL DB, and display table to user
- Sample PHP app to take user input, write to DB2 for i5, and display table to user
TOOLS and URLs
- www.i5php.net - iSeries MySQL forum
- MySQL Administrator -- Administer MySQL Server
- MySQL Query Browser -- Use this graphical client to work with your MySQL databases and run queries