Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions pmm_qa/percona_server_for_mysql/tasks/prepare_install_ps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,21 @@
seconds: 5

- name: Chance root password Percona Server for MySQL 5.7
shell: "docker exec {{ container_prefix }}{{ item }} mysql -e \"ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '{{ root_password }}';\""
shell: >
docker exec {{ container_prefix }}{{ item }} mysql -e "
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '{{ root_password }}';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED WITH mysql_native_password BY '{{ root_password }}' WITH GRANT OPTION;
FLUSH PRIVILEGES;"
loop: "{{ range(1, nodes_count | int + 1) | list }}"
when: ps_version|replace('_', '')|int < 80

- name: Chance root password Percona Server for MySQL 8.0+
shell: "docker exec {{ container_prefix }}{{ item }} mysql -e \"ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '{{ root_password }}';\""
shell: >
docker exec {{ container_prefix }}{{ item }} mysql -e "
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '{{ root_password }}';
CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED WITH caching_sha2_password BY '{{ root_password }}';
ALTER USER 'root'@'%' IDENTIFIED WITH caching_sha2_password BY '{{ root_password }}';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;"
loop: "{{ range(1, nodes_count | int + 1) | list }}"
when: ps_version|replace('_', '')|int >= 80