diff --git a/data/hooks/conf_regen/34-mysql b/data/hooks/conf_regen/34-mysql index 6c9694796..fd09d5188 100755 --- a/data/hooks/conf_regen/34-mysql +++ b/data/hooks/conf_regen/34-mysql @@ -37,7 +37,7 @@ do_post_regen() { # This is a trick to check if we're able to use mysql without password # Expect instances installed in stretch to already have unix_socket #configured, but not old instances from the jessie/wheezy era - if ! echo "" | mysql + if ! echo "" | mysql 2>/dev/null then password="$(cat /etc/yunohost/mysql)" # Enable plugin unix_socket for root on localhost @@ -45,7 +45,7 @@ do_post_regen() { fi # If now we're able to login without password, drop the mysql password - if echo "" | mysql + if echo "" | mysql 2>/dev/null then rm /etc/yunohost/mysql else