Hi! I’m trying to provision a Staging environment.
Everything goes well until task “mariadb : Set root user password”
"Access denied for user 'root'@'localhost' (using password: NO)")
Two things trouble me:
- using password: NO, when i’ve specified a
mysql_root_password
- What does this mean: Trellis at “Add myhostname to nsswitch.conf to ensure resolvable hostname”
I’ve disabled root login, so everything has to be done via my user (who belongs to sudo) but that does not seem to cause any trouble for all the previous tasks.
I have tried putting back the “stagingwp” default password. To no avail. Why does it not pick up the password to login to mariaDb ?
Can you help me sort this out?
Here is the end part of the log, in case it helps:
TASK [sshd : ensure ssh server is installed] ***********************************
ok: [staging.example.com]
TASK [sshd : ensure sshd is configured] ****************************************
ok: [staging.example.com]
TASK [mariadb : Add MariaDB MySQL apt-key] *************************************
ok: [staging.example.com]
TASK [mariadb : Add MariaDB MySQL deb and deb-src] *****************************
ok: [staging.example.com] => (item=deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main)
ok: [staging.example.com] => (item=deb-src http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main)
TASK [mariadb : Install MySQL client] ******************************************
ok: [staging.example.com]
TASK [mariadb : Install MariaDB MySQL server] **********************************
ok: [staging.example.com]
TASK [mariadb : Disable MariaDB binary logging] ********************************
ok: [staging.example.com]
TASK [mariadb : Restart MariaDB MySQL Server] **********************************
changed: [staging.example.com]
TASK [mariadb : Set root user password] **************************************
System info:
Ansible 2.2.0.0; Darwin
Trellis at "Add myhostname to nsswitch.conf to ensure resolvable hostname"
---------------------------------------------------
unable to connect to database, check login_user and login_password are
correct or /root/.my.cnf has the credentials. Exception message: (1045,
"Access denied for user 'root'@'localhost' (using password: NO)")
failed: [staging.example.com] (item=staging.example.com) => {"failed": true, "item": "staging.example.com"}
---------------------------------------------------
unable to connect to database, check login_user and login_password are
correct or /root/.my.cnf has the credentials. Exception message: (1045,
"Access denied for user 'root'@'localhost' (using password: NO)")
failed: [staging.example.com] (item=127.0.0.1) => {"failed": true, "item": "127.0.0.1"}
---------------------------------------------------
unable to connect to database, check login_user and login_password are
correct or /root/.my.cnf has the credentials. Exception message: (1045,
"Access denied for user 'root'@'localhost' (using password: NO)")
failed: [staging.example.com] (item=::1) => {"failed": true, "item": "::1"}
---------------------------------------------------
unable to connect to database, check login_user and login_password are
correct or /root/.my.cnf has the credentials. Exception message: (1045,
"Access denied for user 'root'@'localhost' (using password: NO)")
failed: [staging.example.com] (item=localhost) => {"failed": true, "item": "localhost"}
to retry, use: --limit @/Users/aplennevaux/BITBUCKET/paris-match-wordpress-theme/parismatch.be/trellis/server.retry