From 577a4463ad14833eb97a35597187d69ce6f5577b Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Wed, 15 Feb 2023 12:04:59 +0100 Subject: [PATCH] Account deletion > Use mysql "DROP USER" Instead of messing directly with mysql internal tables Closes #78 --- scripts/web-add.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/web-add.sh b/scripts/web-add.sh index 443fecc..cb6ccea 100755 --- a/scripts/web-add.sh +++ b/scripts/web-add.sh @@ -829,7 +829,7 @@ op_del() { if [ -n "$dbname" ]; then set -x - echo "DROP DATABASE \`$dbname\`; delete from mysql.user where user='$login'; FLUSH PRIVILEGES;" | mysql $MYSQL_OPTS + echo "DROP DATABASE \`$dbname\`; DROP USER \`$login\`@localhost; FLUSH PRIVILEGES;" | mysql $MYSQL_OPTS set +x fi }