Account deletion > Use mysql "DROP USER"

Instead of messing directly with mysql internal tables
Closes #78
This commit is contained in:
Ludovic Poujol 2023-02-15 12:04:59 +01:00
parent 66c159a625
commit 577a4463ad
1 changed files with 1 additions and 1 deletions

View File

@ -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
}