Как назнатить данные реального времени ведомым устройством из двух источников MySQL, объединяющихся в одному месту назначения MySQL?

Вы проверил полномочия?

Для пользователя мерзавца (обычно названный мерзавцем)?

Посмотрите это

http://www.kernel.org/pub/software/scm/git/docs/everyday.html

4
задан 22 February 2012 в 22:31
2 ответа

There isn't a good read-made tool to do this. pt-table-sync doesn't work exactly as you've been told (I wrote it ;) but it's not the right solution. I have seen its bidirectional syncing functionality used to reconcile servers to a central source after being intentionally disconnected and updated, but this isn't the right solution for what you need.

I don't normally give sales pitches on topics like this, but this is honestly a case where I'd engage Percona to develop a new tool for you. Some people have written little scripts that suit their personal scenarios, but a high-quality solution for general use doesn't exist yet, and isn't really that hard. The main thing is that you need formal testing, and Percona Toolkit's components are already 90% of the way to what you need -- it just needs a little bit of glue between them. You could do this yourself, of course, but why make a square wheel and end up maintaining it yourself and discovering all of its bugs when you least desire it?

That said (end sales pitch, sorry) -- the solution I'd suggest should avoid blackhole tables and go with simpler, less troublesome techniques. (Yeah -- I wrote High Performance MySQL, too. I know. Back then I hadn't seen as many problems with blackhole tables as I have today.) It should do roughly what Rolando suggests, but there are some subtleties. For example, it shouldn't let the I/O thread stream a bunch of data from the master, getting far ahead of the SQL thread, then throw it all away when it round-robins to the next server. That would be really wasteful and cause a lot of impact on the master. There are a lot of little details like this that need to be taken care of -- another that comes to mind is not switching masters when a replication-caused temporary table is in use.

0
ответ дан 3 December 2019 в 04:01

Теги

Похожие вопросы