Zend DBi may not respond to changes in the my.cnf configuration file

If changes made to the my.cnf configuration file for MySQL do not seem to be changing the behavior of your Zend DBi installation of MySQL, there are two issues to look at.

1. my.cnf is “World-writable”

MySQL will not process the my.cnf configuration file on start up if the file has all permissions granted to user *PUBLIC.  The following message will appear in the PASE start up:

Warning: World-writable config file '/usr/local/mysql/bin/my.cnf' is ignored

It is important to be able to configure MySQL with directives in the my.conf file.  As distributed, this file has public permissions that must be revoked.  This article tells how to do it.

Prerequisite:  Zend DBi must be installed.  The following article can help with that:

Install MySQL using the Zend DBi installer with Zend Server

To begin, please log in to a 5250 session as QSECOFR or a *SECOFR class user.  Please enter these two commands:

CHGAUT OBJ('/usr/local/mysql/bin/my.cnf') USER(*PUBLIC) DTAAUT(*EXCLUDE) OBJAUT(*NONE)

CHGAUT OBJ('/usr/local/mysql/bin/my.cnf') USER(MYSQL) DTAAUT(*RX) OBJAUT(*NONE)

You can copy the commands from here and paste them into your 5250 session command line.  Copy the first command.  Paste it onto the command line.  Press enter.  Copy the second command.  Paste it onto the command line.  Press enter.

Stop and start Zend DBi daemon for the change to take effect.  This can be done from the Zend DBi Management menu.  If you are not familiar with this menu, please take a look at this article:

Start the Zend DBi MySQL Daemon job and verify it is running

2. my.cnf is in a special directory for Zend DBi

Lots of documentation refers to file /etc/my.cnf as the file to use to configure MySQL.  This is not the file to use to configure Zend DBi MySQL.  The correct file to use is /usr/local/mysql/bin/my.cnf .  Changes made to /etc/my.cnf will not affect the Zend DBi MySQL server daemon.  This is because the start up script includes this clause in the mysqld command:

--defaults-file=/usr/local/mysql/bin/my.cnf

Changes to your MySQL configuration should be made in this file.  This file should be backed up before and after changes.  Before, so you can back out any changes that might cause a problem.  After, so you always have a current copy of your configuration, in case you ever need to reinstall Zend DBi.

Bookmark the permalink.

Leave a Reply