Description:
This issue doesn't effect any default installation of repo rpms if user uses init scripts that are shipped as part of package but will have trouble if user tries to createdb or start server manually.
after installing mysql-server from repository(yum,zypper) /var/log/mysqld.log is created with logged in user and group permissions instead of with mysql user and group permissions,due to which while creating database or starting server, it is failing
How to repeat:
yum -y remove 'mysql*'
rm -rf /var/log/mysqld.log /var/lib/mysql
yum -y install mysql-community-release-el5-11.noarch.rpm
yum -y --enablerepo=mysql57-community-dmr install mysql-server
[lroot@viking77 Ramana]# ls -ld /var/lib/mysql
drwxr-x--x 2 mysql mysql 4096 Sep 15 10:39 /var/lib/mysql
[lroot@viking77 Ramana]# ls -ld /var/log/mysqld.log
-rw-r--r-- 1 root lroot 0 Sep 22 10:18 /var/log/mysqld.log
[lroot@viking77 Ramana]# mysqld -umysql --basedir=/usr/ --datadir=/var/lib/mysql --initialize<--try creating database or start server, failing without any reason,but obvious reason is due to log file permissions problem
[lroot@viking77 Ramana]# ls -lrt /var/log/mysqld.log
-rw-r--r-- 1 root lroot 0 Sep 22 10:18 /var/log/mysqld.log
[lroot@viking77 Ramana]# ls -lrt /var/lib/mysql
total 0
Suggested fix:
generate /var/log/mysqld.log with correct permissions while installing server packages from repo