Skip to content

Commit 1d8bd45

Browse files
ltangvaldbkandasa
authored andcommitted
Bug#25650096 PACKAGE UPGRADE FROM 5.5 NATIVE TO 5.7 THROWS ERRORS ON DEBIAN
When upgrading from native 5.5 packages in Debian we need to reset ownership on /var/run/mysqld (owned by root), or the systemd service will throw an error because it can't assign it to the mysql user. (cherry picked from commit 88c2441d41933307208227629481adfe28ac764f)
1 parent de3e8d0 commit 1d8bd45

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packaging/deb-in/mysql-packagesource-server.preinst.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ case "$1" in
5555
invoke-rc.d mysql stop || exit $?
5656
server_stop
5757
fi
58+
# Native 5.5 packages create a /var/run/mysqld owned by root. This can cause
59+
# errors in the systemd service, so we reset ownership if it exists.
60+
MYSQLRUN=/var/run/mysqld
61+
if [ -d ${MYSQLRUN} ]; then
62+
install -d -m0755 -omysql -gmysql ${MYSQLRUN}
63+
fi
5864

5965
set +e
6066

0 commit comments

Comments
 (0)