QGPL in system library list prevents Zend DBi MySQL daemon from starting

This article presents one of the troubleshooting steps for Zend DBi MySQL daemon start ups, found in this article:

Troubleshoot Zend DBi MySQL daemon start up failures (mysql.sock)

To check this issue, please log on to a 5250 session and enter this command:

dspsysval qsyslibl

The output will be similar to this:

Sequence         
 number   Library
     0           
    10    QSYS   
    20    QSYS2  
    30    QHLPSYS
    40    QUSRSYS
    50    QGPL

If QGPL appears on this list, as in the above example, it’s a problem.  Another indicator you may see for this problem is this message appears when starting the Zend DBi MySQL daemon job from the menu:

CPF1338 received by procedure ZENDDBID. (C D I R)

If QGPL is not in the default system library list and the CPF 1338 message does not appear, this is probably not the problem.  Please return to the troubleshooter to try another step.

If QGPL in the system library list is the problem, here is a way to work around it and get the Zend DBi MySQL daemon running.  To do it, rename the existing start program, then put in a new start program that changes the system library list and calls the old renamed program.  Please sign on to a 5250 session as QSECOFR or a *SECOFR class user.  Then do the following steps.

1. Rename the existing MySQL start up program:

RNMOBJ OBJ(ZMYSQL/ZMYSQLSTRT) OBJTYPE(*PGM) NEWOBJ(ZMYSQLSTRX)

2. Create a new CLP source member for the new start up program. In this example, the source member will be SOMELIB/ZMYSQLSTRT.

3. Put this source in your new source member:

/* This program will fix a problem starting MySQL when QGPL is in the system */
/* library list. */

/*****************************************************************************/
/* IMPORTANT: */
/* First, rename the existing ZMYSQLSTRT program to ZMYSQLSTRX: */
/* */
/* RNMOBJ OBJ(ZMYSQL/ZMYSQLSTRT) OBJTYPE(*PGM) NEWOBJ(ZMYSQLSTRX) */
/* */
/* Only then should you compile this program as ZMYSQL/ZMYSQLSTRT. This */
/* program calls the renamed program. */
/*****************************************************************************/

 PGM 
 CHGSYSLIBL LIB(QGPL) OPTION(*REMOVE) 
 CALL ZMYSQL/ZMYSQLSTRX 
 ENDPGM

4. Create the new start up program (remember to put your library in place of SOMELIB in the following command):

CRTCLPGM PGM(ZMYSQL/ZMYSQLSTRT) SRCFILE(SOMELIB/QCLSRC)

5. To start up successfully with the subsystem, user MYSQL needs authority to use the CHGSYSLIBL command:

GRTOBJAUT OBJ(CHGSYSLIBL) OBJTYPE(*CMD) USER(MYSQL) AUT(*USE)

To start up successfully using option 6 from the ZendDBi management menu, the user signed on to the 5250 session will need use authority to the CHGSYSLIBL command.

6. Because ZMYSQL/ZMYSQLSTRT is a program distributed with Zend DBi, it might be replaced any time an upgrade is done, and will surely be replaced if a reinstall is done. Please make it a policy to test this issue after any update or reinstall, and repeat the above steps if needed.

Bookmark the permalink.

Leave a Reply