# prompting for password

**URL:** <https://forum.ansible.com/t/prompting-for-password/30849>\
**Category:** Ansible Project\
**Created:** [July 23, 2019, 7:16pm UTC](https://forum.ansible.com/t/prompting-for-password/30849 "2019-07-23T19:16:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_McPherson](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dave_mcpherson/32/6973_2.png) [@Dave\_McPherson](https://forum.ansible.com/u/Dave_McPherson)\
**Post date:** [July 23, 2019, 7:16pm UTC](https://forum.ansible.com/t/prompting-for-password/30849/1 "2019-07-23T19:16:23Z")

</div>

I am attempting to do a db update.  
I have tried using the following command

- name: run mysqlupgrade  
command: 'mysql\_upgrade -u root -p   
it hangs waiting for the password  
so I tried

- name: run mysqlupgrade  
expect:  
command: 'mysql\_upgrade -u root -p  
responses: (?i) Enter password" “”

The error I get is “argument responses if of type \<type ‘str’\> and we were unable to convert to dict: dictionary requested could not pars JSON or key=value”

Any help would be appreciated.

Dave

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [July 23, 2019, 7:27pm UTC](https://forum.ansible.com/t/prompting-for-password/30849/2 "2019-07-23T19:27:07Z")

</div>

Your responses need to be a dictinary

&nbsp;&nbsp;- name: run mysqlupgrade  
&nbsp;&nbsp;&nbsp;&nbsp;expect:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command: 'mysql\_upgrade -u root -p  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;responses:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enter password: \<password\>
