# ansible mysql-server installation , password issue

**URL:** <https://forum.ansible.com/t/ansible-mysql-server-installation-password-issue/16070>\
**Category:** Ansible Project\
**Created:** [August 29, 2014, 11:23am UTC](https://forum.ansible.com/t/ansible-mysql-server-installation-password-issue/16070 "2014-08-29T11:23:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Urgen\_Sherpa](https://avatars.discourse-cdn.com/v4/letter/u/74df32/32.png) [@Urgen\_Sherpa](https://forum.ansible.com/u/Urgen_Sherpa)\
**Post date:** [August 29, 2014, 11:23am UTC](https://forum.ansible.com/t/ansible-mysql-server-installation-password-issue/16070/1 "2014-08-29T11:23:34Z")

</div>

Greetings!  
I am new to ansible and im trying to install mysql-server below is my playbook [im in a vmware10 using two centos 6.5 x64 machines one as ansible-Node and another as client]

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [August 29, 2014, 12:03pm UTC](https://forum.ansible.com/t/ansible-mysql-server-installation-password-issue/16070/2 "2014-08-29T12:03:47Z")

</div>

Try searching for “mysql” on [galaxy.ansible.com](http://galaxy.ansible.com) and you’ll see a lot of roles that set up MySQL\>

In this case it sounds like you have a MySQL specific config issue and it’s not specifically an Ansible issue, but I agree it’s not the best possible experience from the tool.

(Note that you’ll really want to see this fully automated anyway, hence why I recommend researching MySQL roles. Having to manually run the interactive step to configure it isn’t the long term goal, etc)

---

<div class="post-metadata">

**Author:** ![Petr\_Sukharev](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@Petr\_Sukharev](https://forum.ansible.com/u/Petr_Sukharev)\
**Post date:** [August 29, 2014, 5:11pm UTC](https://forum.ansible.com/t/ansible-mysql-server-installation-password-issue/16070/3 "2014-08-29T17:11:27Z")

</div>

What is MySQL version?

If 5.6 - root password is placed in /root/.mysql\_secure or same file and when you login first time with it into mysql server, it ask you to change password.

I have role to setup MySQL

For 5.3 - 5.5

Install packages, run mysql\_install\_db, generate password and place it into variable, generate unattended file like this:

PASSWORD

PASSWORD

and apply this file on server via “cat unattended\_file | mysql\_secure\_install”
