From d1f0064b10645b3dd12cca88e454193ccb5f1334 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 13 Apr 2021 14:18:49 +0200 Subject: [PATCH] mysql regenconf: Get rid of confusing 'Access denied' message --- data/hooks/conf_regen/34-mysql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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