I have a problem that I don't know how I could solve it.

I have two tables in two different databases on two servers.

Server 1 (Master) has the data and server 2 is the slave. But Server 2 only needs 3 col's of 30 col+ table

And I sync insert, update and delete from the Master to the slave.

What I could do is a Cronjob, using the php application or maybe has MySQL/InnoDB a way todo it?

Best regards :)

1 Answer 1


On the Replica, you could either of

  • Provide a VIEW that exposes only the 3 columns.

  • Use GRANT to limit what users can see or do with each column.

Another approach is to vertically split the table:

  • t3 has the 3 columns; it is replicated

  • t27 has the other 27 columns; it is not replicated

  • t30 is a VIEW composed of a JOIN of the other two tables based on their shared PRIMARY KEY. This could satisfy most of the existing activity on the Primary server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.