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

Clint Byrum spamaps at debian.org
Sat Jan 25 19:20:58 UTC 2014


Ghislain, I think you've found a legitimate bug. Have you filed this
already in the debian bug tracker? I want to make sure you get credit
for hounding us to fix it. :)

Excerpts from Ghislain's message of 2014-01-24 04:23:53 -0800:
>  >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