• guilhem@mysql.com's avatar
    Fix for BUG#4038 "rpm postinstall script leaves files as owned by root": · 4bd44185
    guilhem@mysql.com authored
    the rpm postinstall script must call mysql_install_db with --user=mysql,
    and mysql_install_db must then pass this to mysqld. Otherwise, mysqld
    runs as root, and if you have --log-bin=somewhere_out_of_var_lib_mysql
    it creates binlog files owned by root in this dir, and this dir is not
    fixed by the 'chmod mysql', so files remain owned by root, and later mysqld
    (running as 'mysql') can't read them.
    I'm hardcoding 'mysql' in the postinstall script, but it's already hardcoded
    there in many places (see the useradd and chown) so it's ok.
    4bd44185
mysql.spec.sh 24.9 KB