Set up maintenance user for galera, root password did not work because it used symbols
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
repository: https://github.com/jcwimer/wrestlingApp.git
|
||||
root_mysql_password: something
|
||||
heroku_jcw_password: something
|
||||
debian_sys_maint_password: something
|
||||
proxy_stats_uri: /someplace
|
||||
proxy_stats_user: something
|
||||
proxy_stats_pass: something
|
||||
|
||||
@@ -36,14 +36,15 @@
|
||||
action: shell mysql -e "CREATE USER 'heroku_jcw'@'%' IDENTIFIED BY '{{ heroku_jcw_password }}';GRANT ALL PRIVILEGES ON wrestlingtourney.* TO 'heroku_jcw'@'%'; FLUSH PRIVILEGES;"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Set maintenance password
|
||||
action: shell mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '{{ debian_sys_maint_password }}' WITH GRANT OPTION; FLUSH PRIVILEGES;"
|
||||
|
||||
- name: set mysql root password
|
||||
action: shell mysql -e "UPDATE mysql.user SET password=PASSWORD('{{ root_mysql_password }}') where user='root'; FLUSH PRIVILEGES;"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Stop mysql service
|
||||
service: name=mysql state=stopped
|
||||
|
||||
- name: Replace debian config file
|
||||
template: src=../roles/db/templates/debian.cnf.j2 dest=/etc/mysql/debian.cnf
|
||||
|
||||
|
||||
- name: Stop mysql service
|
||||
service: name=mysql state=stopped
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Automatically generated for Debian scripts. DO NOT TOUCH!
|
||||
[client]
|
||||
host = localhost
|
||||
user = root
|
||||
password = {{ root_mysql_password }}
|
||||
user = debian-sys-maint
|
||||
password = {{ debian_sys_maint_password }}
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
[mysql_upgrade]
|
||||
host = localhost
|
||||
user = root
|
||||
password = {{ root_mysql_password }}
|
||||
user = debian-sys-maint
|
||||
password = {{ debian_sys_maint_password }}
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
basedir = /usr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user