Skip to content

Commit 070a599

Browse files
authored
Merge pull request geerlingguy#416 from patacra/master
Fixes geerlingguy#412: Flush privileges after root account password update
2 parents bf2ab91 + 10a5a65 commit 070a599

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tasks/secure-installation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
shell: >
4444
mysql -u root -NBe
4545
'ALTER USER "{{ mysql_root_username }}"@"{{ item }}"
46-
IDENTIFIED WITH mysql_native_password BY "{{ mysql_root_password }}";'
46+
IDENTIFIED WITH mysql_native_password BY "{{ mysql_root_password }}"; FLUSH PRIVILEGES;'
4747
with_items: "{{ mysql_root_hosts.stdout_lines|default([]) }}"
4848
when: >
4949
((mysql_install_packages | bool) or mysql_root_password_update)
@@ -53,7 +53,7 @@
5353
- name: Update MySQL root password for localhost root account (< 5.7.x).
5454
shell: >
5555
mysql -NBe
56-
'SET PASSWORD FOR "{{ mysql_root_username }}"@"{{ item }}" = PASSWORD("{{ mysql_root_password }}");'
56+
'SET PASSWORD FOR "{{ mysql_root_username }}"@"{{ item }}" = PASSWORD("{{ mysql_root_password }}"); FLUSH PRIVILEGES;'
5757
with_items: "{{ mysql_root_hosts.stdout_lines|default([]) }}"
5858
when: >
5959
((mysql_install_packages | bool) or mysql_root_password_update)

0 commit comments

Comments
 (0)