1

I don't know if this is at all possible, but I need to somehow copy in real-time to a slave MYSQL that I can access for stats, instead of risking the MYSQL database that is being used LIVE for our client.

The slave MYSQL will be linked to our website and will only be used to do functions like count and other stuff that does not need to modify the data.

The reason we don't want to give outside IP access to our internal MYSQL so instead by using a remote MYSQL server I am hoping to be able to watch a table and if modified then update the slave server with the changes.

4
  • 1
    MySQL supports replication, which sounds like it would do what you need. There's a chapter of documentation online about configuring it: dev.mysql.com/doc/refman/8.0/en/replication.html There are also books and tutorials that help to learn about it. Apr 21, 2022 at 23:45
  • 1
    I apologize for redirecting you to documentation, but I note that you did not actually ask a question in your post, you only stated a thing you wanted to do. I have no way of knowing if you're stuck, or what you need help with. I suggest you review the Stack Overflow Help Center about how to ask a good question: stackoverflow.com/help/asking Apr 21, 2022 at 23:46
  • @BillKarwin sorry i could not think how to word it clearly - But you answered my question with the replication - please put that as an answer and I'll tick it.
    – RUSSELL HARROWER
    Apr 21, 2022 at 23:55
  • Please ask database admin related questions on the dedicated DBA sister site of SO, not on the programming focused SO!
    – Shadow
    Apr 22, 2022 at 0:03

1 Answer 1

2

Summary of the comments above:

MySQL does support automatic replication. Here are some resources:

If you go through the documentation and try it and get stuck, feel free to come back here to dba.stackexchange.com. Tell us what you tried, where you got stuck (include any error messages), and we'll try to help.

Your Answer

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