CentOS: Did the RPM create a user?
Solution 1:
To view scripts in a RPM run:
rpm -q --scripts $INSTALLEDPACKAGE
To answer your question: yes, mysql-server creates the mysql user.
[user@server CentOS]# rpm -qp --scripts mysql-server-5.0.77-4.el5_4.2.i386.rpm
warning: mysql-server-5.0.77-4.el5_4.2.i386.rpm: V3 DSA signature: NOKEY, key ID e8562897
preinstall scriptlet (using /bin/sh):
/usr/sbin/useradd -M -o -r -d /var/lib/mysql -s /bin/bash \
-c "MySQL Server" -u 27 mysql > /dev/null 2>&1 || :
postinstall scriptlet (using /bin/sh):
if [ $1 = 1 ]; then
/sbin/chkconfig --add mysqld
fi
/bin/chmod 0755 /var/lib/mysql
/bin/touch /var/log/mysqld.log
preuninstall scriptlet (using /bin/sh):
if [ $1 = 0 ]; then
/sbin/chkconfig --del mysqld
fi
postuninstall scriptlet (using /bin/sh):
if [ $1 -ge 1 ]; then
/sbin/service mysqld condrestart >/dev/null 2>&1 || :
fi