# MySQL trigger from one host to another host

**URL:** <https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470>\
**Category:** Ignition\
**Created:** [June 2, 2023, 4:44am UTC](https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470 "2023-06-02T04:44:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [June 2, 2023, 4:44am UTC](https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470/1 "2023-06-02T04:44:45Z")

</div>

Hi,

In one of our projects that was moved to production six months ago, the customer requested an additional cloud database. They want to transfer data from a specific table in the production MySQL database to the cloud database with minimal downtime. What are the possibilities to achieve this?  
Note: Both Ignition and db are in same server.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 2, 2023, 7:10am UTC](https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470/2 "2023-06-02T07:10:13Z")

</div>

Do you mean they want to change the database for this table and then use the new one, or do you mean sync the 2 tables so that they have 2 up to date tables in 2 places ?

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [June 2, 2023, 7:10am UTC](https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470/3 "2023-06-02T07:10:30Z")

</div>

If you can live with "temporarily unable to access some historical data", just duplicate the local database, then update the ignition database settings, at last synchronize the missing data.

---

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [June 2, 2023, 7:11am UTC](https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470/4 "2023-06-02T07:11:47Z")

</div>

They need sync between 2 tables !.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 2, 2023, 7:15am UTC](https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470/5 "2023-06-02T07:15:49Z")

</div>

Then I suggest you read this:  
[https://dev.mysql.com/doc/mysql-replication-excerpt/8.0/en/replication-solutions.html](https://dev.mysql.com/doc/mysql-replication-excerpt/8.0/en/replication-solutions.html)

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [June 2, 2023, 7:16am UTC](https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470/6 "2023-06-02T07:16:29Z")

</div>

So the Tag History Splitter is best choice. If you want to log new historydata to both database, all your tags config need to update.  
[https://docs.inductiveautomation.com/display/DOC81/Tag+History+Providers](https://docs.inductiveautomation.com/display/DOC81/Tag+History+Providers)

---

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [June 2, 2023, 7:16am UTC](https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470/7 "2023-06-02T07:16:59Z")

</div>

I need replication for a specific table not the historian table

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 2, 2023, 7:18am UTC](https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470/8 "2023-06-02T07:18:09Z")

</div>

You might also find helpful tools in MySQL workbench:

[https://dev.mysql.com/doc/workbench/en/wb-database-synchronization.html](https://dev.mysql.com/doc/workbench/en/wb-database-synchronization.html)

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [June 2, 2023, 7:18am UTC](https://forum.inductiveautomation.com/t/mysql-trigger-from-one-host-to-another-host/74470/9 "2023-06-02T07:18:59Z")

</div>

I have no experience with this. Follow Pascal's advice.
