Skip to content

Commit dab3e1e

Browse files
committed
Fixes geerlingguy#90, geerlingguy#89, geerlingguy#68, geerlingguy#34: Add note for root password issues and document sudo requirement.
1 parent 94b0b17 commit dab3e1e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ Installs and configures MySQL or MariaDB server on RHEL/CentOS or Debian/Ubuntu
66

77
## Requirements
88

9-
None.
9+
No special requirements; note that this role requires root access, so either run it in a playbook with a global `become: yes`, or invoke the role in your playbook like:
10+
11+
- hosts: database
12+
roles:
13+
- role: geerlingguy.mysql
14+
become: yes
1015

1116
## Role Variables
1217

@@ -24,6 +29,8 @@ The MySQL root user account password.
2429

2530
Whether to force update the MySQL root user's password. By default, this role will only change the root user's password when MySQL is first configured. You can force an update by setting this to `yes`.
2631

32+
> Note: If you get an error like `ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)` after a failed or interrupted playbook run, this usually means the root password wasn't originally updated to begin with. Try either removing the `.my.cnf` file inside the configured `mysql_user_home` or updating it and setting `password=''` (the insecure default password). Run the playbook again, with `mysql_root_password_update` set to `yes`, and the setup should complete.
33+
2734
mysql_enabled_on_startup: yes
2835

2936
Whether MySQL should be enabled on startup.
@@ -123,6 +130,7 @@ None.
123130
## Example Playbook
124131

125132
- hosts: db-servers
133+
become: yes
126134
vars_files:
127135
- vars/main.yml
128136
roles:

0 commit comments

Comments
 (0)