From dab3e1e62c5cd3323940663beaf181f38590f8a8 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Sat, 26 Mar 2016 21:49:16 -0500 Subject: [PATCH] Fixes #90, #89, #68, #34: Add note for root password issues and document sudo requirement. --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3003f9f..1ae338a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,12 @@ Installs and configures MySQL or MariaDB server on RHEL/CentOS or Debian/Ubuntu ## Requirements -None. +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: + + - hosts: database + roles: + - role: geerlingguy.mysql + become: yes ## Role Variables @@ -24,6 +29,8 @@ The MySQL root user account password. 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`. +> 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. + mysql_enabled_on_startup: yes Whether MySQL should be enabled on startup. @@ -123,6 +130,7 @@ None. ## Example Playbook - hosts: db-servers + become: yes vars_files: - vars/main.yml roles: