1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

mysql_user: fix user_mod on MySQL(-like) 5.7+ (Fixes #3003) (#5388)

This commit is contained in:
Wouter Oosterveld 2016-11-29 20:15:17 +01:00 committed by Matt Clay
parent 0358919db8
commit 61060f4b5f

View file

@ -346,7 +346,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 = %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