I need to able to add an index to a column in a MySQL table. I am using Mysql Ver 14.12 Distrib 5.0.77 and Percona-Toolkit 2.0.3. I can add the index using the Percona-Toolkit using:
pt-online-schema-change --alter "ADD INDEX server (server) USING BTREE" h=host1,D=customer,t=test_percona_restructure,u=user,p=password
This works fine on host1. The issue is that this change is not replicated over to host2 and host3 which is not desirable. Running the above on the other two instances will break replication in the environment.
Is there a way that the above can be achieved and in real time and replicated across to host 2 and 3? From the documentation, I see that pt-table-sync
sounds like it could be close but sounds like you need to complete the schema change and then sync which is bad for me.
Any help would be great.