# Responding to password prompt

**URL:** <https://forum.ansible.com/t/responding-to-password-prompt/30850>\
**Category:** Ansible Project\
**Created:** [July 23, 2019, 7:18pm UTC](https://forum.ansible.com/t/responding-to-password-prompt/30850 "2019-07-23T19:18:44Z")\
**Posts on this page:** 1\
**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:18pm UTC](https://forum.ansible.com/t/responding-to-password-prompt/30850/1 "2019-07-23T19:18:44Z")

</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
