Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
mysql_user: fix user_mod on MySQL(-like) 5.7+ (Fixes #3003) (#5388)
Browse files Browse the repository at this point in the history
(cherry picked from commit 30fb384)
  • Loading branch information
wouteroostervld authored and jimi-c committed Nov 29, 2016
1 parent 7f1af99 commit c51d43f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/mysql/mysql_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c51d43f

Please sign in to comment.