# what can i do if destination mysql database has a GTID constraint on

**URL:** https://discourse.getdbt.com/t/what-can-i-do-if-destination-mysql-database-has-a-gtid-constraint-on/7204
**Category:** Help
**Tags:** materialization, dbt-core
**Created:** [March 9, 2023, 1:01pm UTC](https://discourse.getdbt.com/t/what-can-i-do-if-destination-mysql-database-has-a-gtid-constraint-on/7204 "2023-03-09T13:01:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ftwcpc](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/ftwcpc/32/2028_2.png) [@ftwcpc](https://discourse.getdbt.com/u/ftwcpc)
#### Post date: [March 9, 2023, 1:01pm UTC](https://discourse.getdbt.com/t/what-can-i-do-if-destination-mysql-database-has-a-gtid-constraint-on/7204/1 "2023-03-09T13:01:37Z")

</div>

## The problem I’m having

The destination Mysql replication has GTID on and ‘create table as select …’ not work for me.

## The context of why I’m trying to do this

I try to write data to cloud data base with dbt.

---

<div class="post-metadata">

### Author: ![sthienard](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@sthienard](https://discourse.getdbt.com/u/sthienard)
#### Post date: [May 2, 2024, 5:09pm UTC](https://discourse.getdbt.com/t/what-can-i-do-if-destination-mysql-database-has-a-gtid-constraint-on/7204/2 "2024-05-02T17:09:23Z")

</div>

Hello, have you found a solution to this problem? I have the same constraint on a MySQL 5.7 instance, it seems impossible to create any dataset in a table with dbt because of this constraint. Regards
