Hide Forgot
Description of problem: at my site there is one system where the mysql user is not the user we run mysql as (historical reasons, can't change). Thus every time there is an update for mysql I am required to modify the init.d script. This is a bit odd as in /etc/my.cnf there is a 'user' entry for mysqld. It would be nice if /etc/init.d/mysqld used the value for user I've set in /etc/my.cnf Version-Release number of selected component (if applicable):mysql-5.0.95-1.el5_7.1 How reproducible: always Steps to Reproduce: 1. stop mysql 2. set [mysqld] user=dbuser 3. start mysql 4. check to see what user it is running as Actual results: runs as mysql Expected results: run as dbuser Additional info: There appears to be a script for determining the location of the datadir and whatnot already in use within the init script.
There's basically no chance that we're going to support that within the Red Hat packaging, as for example there are files in the RPMs that are owned by the RPM-created mysql user. The initscript is merely the smallest and easiest to fix tip of that iceberg. In versions later than RHEL5 there is also SELinux security policy to contend with. I'd recommend migrating away from your nonstandard user selection, instead.
This isn't going to get fixed in RHEL5, although I think systemd-based packaging might be more flexible.