summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWouter Oosterveld <wouter@fizzyflux.nl>2016-11-29 20:15:17 +0100
committerJames Cammarata <jimi@sngx.net>2016-11-29 13:17:38 -0600
commitc51d43f604cc1e62805b3bae6dda1cc35d349984 (patch)
treeb2e24e7feaa8e7cc825960e2a961daca74eb0f79
parent7f1af990691bb15e286b6b9e5195d812f3b761dd (diff)
downloadansible-modules-core-c51d43f604cc1e62805b3bae6dda1cc35d349984.tar.gz
mysql_user: fix user_mod on MySQL(-like) 5.7+ (Fixes #3003) (#5388)
(cherry picked from commit 30fb384e7fb9a94ac3929e4a650877e45d8834c9)
-rw-r--r--database/mysql/mysql_user.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/database/mysql/mysql_user.py b/database/mysql/mysql_user.py
index fe1ef5a8..31dfa195 100644
--- a/database/mysql/mysql_user.py
+++ b/database/mysql/mysql_user.py
@@ -293,7 +293,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