# MySQL\_replication module

**URL:** <https://forum.ansible.com/t/mysql-replication-module/12988>\
**Category:** Ansible Project\
**Created:** [June 19, 2013, 12:17pm UTC](https://forum.ansible.com/t/mysql-replication-module/12988 "2013-06-19T12:17:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balazs\_Pocze](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@Balazs\_Pocze](https://forum.ansible.com/u/Balazs_Pocze)\
**Post date:** [June 19, 2013, 12:17pm UTC](https://forum.ansible.com/t/mysql-replication-module/12988/1 "2013-06-19T12:17:46Z")

</div>

Hi Guys,

I've finished a module for ansible, it is called as  
'mysql\_replication' and of course you can manage mysql replication  
features with that.  
It can operate in different ways, you can check replication master's  
status, replication slave's status, you can change replication  
parameters, and stop / start slaves. The documentation is speaks for  
itself I guess. I hope, it will be merged soon, but before that you  
can check/test/use it from here:

[https://github.com/banyek/ansible/blob/devel/library/database/mysql\_replication](https://github.com/banyek/ansible/blob/devel/library/database/mysql_replication)

"Some" code was taken from Mark Theunissen's mysqldb module (for  
example to connect to db, strip quotes, parse config) thanks for him!

kind regards,  
&nbsp;&nbsp;Balazs Pocze

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [June 19, 2013, 2:38pm UTC](https://forum.ansible.com/t/mysql-replication-module/12988/2 "2013-06-19T14:38:54Z")

</div>

Pull request is here – [https://github.com/ansible/ansible/pull/3195](https://github.com/ansible/ansible/pull/3195) – were you going to resubmit this or is this one still active?

---

<div class="post-metadata">

**Author:** ![Govinda\_Fichtner](https://avatars.discourse-cdn.com/v4/letter/g/3e96dc/32.png) [@Govinda\_Fichtner](https://forum.ansible.com/u/Govinda_Fichtner)\
**Post date:** [August 1, 2014, 7:04am UTC](https://forum.ansible.com/t/mysql-replication-module/12988/3 "2014-08-01T07:04:53Z")

</div>

Would it make sense to have an additional feature that completely removes mysql slave replication from a slave with “reset slave all;” as described here [http://www.mysqlperformanceblog.com/2013/04/17/reset-slave-vs-reset-slave-all-disconnecting-a-replication-slave-is-easier-with-mysql-5-5/](http://www.mysqlperformanceblog.com/2013/04/17/reset-slave-vs-reset-slave-all-disconnecting-a-replication-slave-is-easier-with-mysql-5-5/)

Currently it is only possible to stop slave replication with mysql\_replication module…

Cheers,

Govinda

---

<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 1, 2014, 11:38am UTC](https://forum.ansible.com/t/mysql-replication-module/12988/4 "2014-08-01T11:38:55Z")

</div>

I think pull requests would definitely be considered, though I’d be looking for some folks using this module to weigh in.

Internally, we’re more of a Postgres shop, so I’m a bit less the one to comment on applicability.
