geerlingguy / ansible-role-mysql

Ansible Role - MySQL
https://galaxy.ansible.com/geerlingguy/mysql/
MIT License
1.05k stars 861 forks source link

Bug corrected when updating mysql root password #513

Closed pulse-mind closed 1 year ago

pulse-mind commented 1 year ago

Bug corrected when updating mysql root password for localhost root account (5.7.x).

failed: [hostname] (item=localhost) => {"ansible_loop_var": "item", "changed": true, "cmd": "mysql -u root -NBe 'ALTER USER \"root\"@\"localhost\" IDENTIFIED WITH mysql_native_password BY \"xxxxx\"; FLUSH PRIVILEGES;'\n", "delta": "0:00:00.013884", "end": "2023-01-09 11:15:43.965674", "item": "localhost", "msg": "non-zero return code", "rc": 1, "start": "2023-01-09 11:15:43.951790", "stderr": "ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\"xxxxx\"' at line 1", "stderr_lines": ["ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\"xxxxx\"' at line 1"], "stdout": "", "stdout_lines": []}