# Unable to grant privileges using mysql\_user module

**URL:** <https://forum.ansible.com/t/unable-to-grant-privileges-using-mysql-user-module/22951>\
**Category:** Ansible Project\
**Created:** [November 3, 2016, 5:57am UTC](https://forum.ansible.com/t/unable-to-grant-privileges-using-mysql-user-module/22951 "2016-11-03T05:57:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mona\_Gopal](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@Mona\_Gopal](https://forum.ansible.com/u/Mona_Gopal)\
**Post date:** [November 3, 2016, 5:57am UTC](https://forum.ansible.com/t/unable-to-grant-privileges-using-mysql-user-module/22951/1 "2016-11-03T05:57:00Z")

</div>

Hi,

I am trying to create a mysql user ‘webaxnuser’ and grant privileges to it.  
Below is the task to do the same.

**- name: create use with all priv**  
**mysql\_user: login\_user=root login\_password=pass login\_host=188.16.2.3 host=% name=webaxnuser password=Webaxn@123 priv=_._:ALL state=present**

The user webaxnuser is getting created, however, the **priv** doesn’t work.  
Get the below error:

failed: [188.16.2.3] =\> {“failed”: true}  
msg: (1045, “Access denied for user ‘root’@‘%’ (using password: YES)”)

FATAL: all hosts have already failed – aborting

How do i go about this issue,  
Kindly suggest a way forward.

Thanks in advance,  
Mona G
