This article is for Zmanda Recovery Manager for MySQL (ZRM)
If the ZRM Server needs to run as a different user than the default mysql user, additional configuration on both the ZRM Server and on the ZRM client is required to support this change. In this example, we will use the following user and group:
- UID: mysqldba
- GID: dba
Please ensure that ZRM Server 3.7 or greater is installed. If the MySQL host is separate from the ZRM server, ZRM Client 3.7 or greater must also be installed on the client host.
Configuring the ZRM Server- Create the new user mysqldba and the new group dba. These are the user and group used to run the mysql database on the MySQL server.
- Stop the ZMC service as the root user
service zmc_zrm stop
- Edit /opt/zmanda/zrm/apache2/conf/httpd.conf to change the following from:
User mysql
Group mysqlto:
User mysqldba
Group dba - Run the following script as the root user:
/usr/bin/mysql-zrm-migrate-file-ownership --user mysqldba --group dbaConfiguring the ZRM client
The following instructions are run on the the ZRM client/MySQL host if it is separate from the ZRM server. If you are running MySQL on the ZRM server itself, use localhost as the host parameter in the Backup|What page. This bypasses fetching through a socket by directly using the cp command to copy data without invoking any xinetd-socket mechanism. For a remote client:
- Start the ZMC service.
service zmc_zrm start
- Run the following script as the root user:
/usr/bin/mysql-zrm-migrate-file-ownership --user mysqldba --group dba
You might see some messages such as:
Could not find /etc/mysql-zrm Could not find /opt/zmanda/zrm/logs Could not find /opt/zmanda/zrm/apache2/htdocs/zmanda-zrm Could not find /opt/zmanda/zrm/bin Could not find /opt/zmanda/zrm/lib Could not find /opt/zmanda/zrm/tmp Could not find /opt/zmanda/zrm/apache2/logs/fastcgi/ Could not find /opt/zmanda/zrm/php/tmp Could not find /opt/zmanda/zrm/php/data
- These are safe to ignore.
User mysql Group mysql
to:
User mysqldba Group dba4. Restart the xinetd service as the root user:
/etc/init.d/xinetd restart