From 30fb384e7fb9a94ac3929e4a650877e45d8834c9 Mon Sep 17 00:00:00 2001 From: Wouter Oosterveld Date: Tue, 29 Nov 2016 20:15:17 +0100 Subject: mysql_user: fix user_mod on MySQL(-like) 5.7+ (Fixes #3003) (#5388) --- database/mysql/mysql_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/mysql/mysql_user.py b/database/mysql/mysql_user.py index 87e8318a..f3231c2f 100644 --- a/database/mysql/mysql_user.py +++ b/database/mysql/mysql_user.py @@ -339,7 +339,7 @@ def user_mod(cursor, user, host, host_all, password, encrypted, new_priv, append if old_user_mgmt: cursor.execute("SET PASSWORD FOR %s@%s = PASSWORD(%s)", (user, host, password)) else: - cursor.execute("ALTER USER %s@%s IDENTIFIED BY %s", (user, host, password)) + cursor.execute("ALTER USER %s@%s IDENTIFIED WITH mysql_native_password BY %s", (user, host, password)) changed = True # Handle privileges -- cgit v1.2.1