# Failed to import MySQL DB via Ansible playbook

**URL:** <https://forum.ansible.com/t/failed-to-import-mysql-db-via-ansible-playbook/27898>\
**Category:** Ansible Project\
**Created:** [June 28, 2018, 1:31pm UTC](https://forum.ansible.com/t/failed-to-import-mysql-db-via-ansible-playbook/27898 "2018-06-28T13:31:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ilya\_Ulis](https://avatars.discourse-cdn.com/v4/letter/i/43a26b/32.png) [@Ilya\_Ulis](https://forum.ansible.com/u/Ilya_Ulis)\
**Post date:** [June 28, 2018, 1:31pm UTC](https://forum.ansible.com/t/failed-to-import-mysql-db-via-ansible-playbook/27898/1 "2018-06-28T13:31:24Z")

</div>

Hi,  
I’m trying to import DB to MySQL via Ansible.  
For test, I cloned test\_db from [https://github.com/datacharmer/test\_db.git](https://github.com/datacharmer/test_db.git) and placed it to /test\_db  
Than I run the following:

mysql\_db:  
login\_user: root  
login\_password: “{{ password }}”  
state: import  
name: all  
target: /test\_db/employees.sql

and failed with - “Failed to open file ‘load\_departments.dump’”  
This file presented in /test\_db and I just need to chdir to this folder, but there is no such option in mysql\_db module.  
I know that I can do it successfully with command module, but is there any way to do it with the dedicated one?
