# Cannot deploy to MySQL cluster with galera or group replication

**URL:** <https://drone.discourse.group/t/cannot-deploy-to-mysql-cluster-with-galera-or-group-replication/5907>\
**Category:** Drone Bugs\
**Created:** [January 20, 2020, 8:26am UTC](https://drone.discourse.group/t/cannot-deploy-to-mysql-cluster-with-galera-or-group-replication/5907 "2020-01-20T08:26:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdf](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/pdf/32/4909_2.png) [@pdf](https://drone.discourse.group/u/pdf)\
**Post date:** [January 20, 2020, 8:26am UTC](https://drone.discourse.group/t/cannot-deploy-to-mysql-cluster-with-galera-or-group-replication/5907/1 "2020-01-20T08:26:42Z")

</div>

Due to the missing primary key on the `migrations` table, attempting to create the table during drone initialization fails, rejected by the server - issue #2771 mentions this (also [here](http://discuss.harness.io/t/failed-to-insert-data-into-migrations-tables-on-mysql-group-replication/5264)), and #2772 attempted fix this by submitting a naive patch against the generated `ddl_gen.go` file.

The actual fix is to require a version of `togo` with [https://github.com/bradrydzewski/togo/pull/3](https://github.com/bradrydzewski/togo/pull/3) applied, and re-generate the ddl files.

This issue blocks installation of drone in environments with replicated mysql servers.

Posting here as the Github issue template told me I should not submit an issue without doing this first.

PS - I would have directly linked the relevant issues, but discourse won’t let me include more than 2 links.

---

<div class="post-metadata">

**Author:** ![rluisr](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/rluisr/32/4593_2.png) [@rluisr](https://drone.discourse.group/u/rluisr)\
**Post date:** [January 20, 2020, 4:08pm UTC](https://drone.discourse.group/t/cannot-deploy-to-mysql-cluster-with-galera-or-group-replication/5907/2 "2020-01-20T16:08:53Z")

</div>

in drone documents says mysql is not recommended.  
use postgreSQL instead of mysql.  
[https://docs.drone.io/installation/storage/database/](https://docs.drone.io/installation/storage/database/)

---

<div class="post-metadata">

**Author:** ![pdf](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/pdf/32/4909_2.png) [@pdf](https://drone.discourse.group/u/pdf)\
**Post date:** [January 21, 2020, 6:57am UTC](https://drone.discourse.group/t/cannot-deploy-to-mysql-cluster-with-galera-or-group-replication/5907/3 "2020-01-21T06:57:46Z")

</div>

I have an existing MySQL cluster, I do not have an existing PostgreSQL cluster, nor do I have the domain knowledge to support one. I imagine this problem will continue to be reported until it’s fixed.
