# mysql\_db won't use given password

**URL:** <https://forum.ansible.com/t/mysql-db-wont-use-given-password/22260>\
**Category:** Ansible Project\
**Created:** [August 10, 2016, 8:43am UTC](https://forum.ansible.com/t/mysql-db-wont-use-given-password/22260 "2016-08-10T08:43:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [August 10, 2016, 8:43am UTC](https://forum.ansible.com/t/mysql-db-wont-use-given-password/22260/1 "2016-08-10T08:43:06Z")

</div>

I have not run any plays with mysql\_db since upgrading to 2.x. But now I keep getting

`TASK [Create mysql database] *************************************************** fatal: [10.0.192.187]: FAILED! => {"changed": false, "failed": true, "msg": "unable to find /root/.my.cnf. Exception message: (2003, \"Can't connect to MySQL server on 'mysql.service.consul' (4)\")"}`

For

`

- name: Create mysql database  
mysql\_db:  
state: present  
name: “{{ repo\_sonarqube\_mysql\_user }}”  
login\_host: mysql.service.consul  
login\_user: “{{ data\_rds\_username }}”  
login\_password: “{{ data\_rds\_password }}”

`

I have tried replacing all the variables with fixed values, but same result.

Anybody else seen this error?

---

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [August 10, 2016, 9:53am UTC](https://forum.ansible.com/t/mysql-db-wont-use-given-password/22260/2 "2016-08-10T09:53:28Z")

</div>

User error, but not so informative error message. My instance security group was not updated to have access to the database.
