# Issues with mysql\_db module

**URL:** <https://forum.ansible.com/t/issues-with-mysql-db-module/37998>\
**Category:** Ansible Project\
**Created:** [May 16, 2023, 6:20pm UTC](https://forum.ansible.com/t/issues-with-mysql-db-module/37998 "2023-05-16T18:20:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![harry\_devine](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/harry_devine/32/5293_2.png) [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Post date:** [May 16, 2023, 6:20pm UTC](https://forum.ansible.com/t/issues-with-mysql-db-module/37998/1 "2023-05-16T18:20:56Z")

</div>

Something changed with the mysql\_db module recently and it has broken all of our MySQL backup playbooks. We get the following error now:

unable to find ‘/home/user/.my.cnf’ . Exception message: ‘password’ is an invalid keyword argument for this function

According to the documentation, the default for config\_file is “~/.my.cnf” for the user and password. But if we make that an empty string, it should be ignored. However, when I try that, I get the same error message, only without the path to the .my.cnf file:

unable to find . Exception message: ‘password’ is an invalid keyword argument for this function

We are specifying our username and password via Ansible Vault:

- name: Backup MySQL databases  
community.mysql.mysql\_db:  
state: dump  
name: “redmine”  
target: “/tmp/backup\_{{ inventory\_hostname }}.{{ ansible\_date\_time.month }}{{ ansible\_date\_time.day }}{{ ansible\_date\_time.year }}.sql”  
config\_file: ‘’  
login\_user: root  
login\_password: “{{ mysql\_password }}”

How can I determine why I’m getting the “password is an invalid keyword argument for this function”, and how can I fix it?

Thanks,  
Harry
