[debian-mysql] Each mysql install lead to file owned by root instead of 'mysql' in /var/lib/mysql

Ghislain gadnet at aqueos.com
Fri Jan 24 12:23:53 UTC 2014


 >I will try to fit in some analysis of this ASAP. It would be extremely 
helpful if you could provide a patch.

thanks for the reply. I do not really know to do this but lets try it on 
mysql-server-5.5.postinst:

*** mysql-server-5.5.postinst   Mon Jan 20 16:37:01 2014
--- mysql-server-5.5.postinst.new       Fri Jan 24 13:16:41 2014
***************
*** 143,149 ****
       # Debian: beware of the bashisms...
       # Debian: can safely run on upgrades with existing databases
       set +e
!     bash /usr/bin/mysql_install_db --rpm 2>&1 | $ERR_LOGGER
       if [ "$?" != "0" ]; then
         echo "ATTENTION: An error has occured. More info is in the syslog!"
       fi
--- 143,149 ----
       # Debian: beware of the bashisms...
       # Debian: can safely run on upgrades with existing databases
       set +e
!     bash /usr/bin/mysql_install_db --rpm --user=mysql 2>&1 | $ERR_LOGGER
       if [ "$?" != "0" ]; then
         echo "ATTENTION: An error has occured. More info is in the syslog!"
       fi



i think this will do it as the issue is the installdb script running as 
root.

regards,
Ghislain.



More information about the pkg-mysql-maint mailing list