0

Is it possible to dump results of the show slave status by using MySQL commands? I understand that I can use kind of script that would parse this result and insert into the table, however is it possible to do that with the MySQL query only?

UPDATED: I can't use performance_schema as it is not enabled now and enabling it requires reboot which we can't do right now.

Dmitrij Kultasev
  • 5,447
  • 5
  • 44
  • 88
  • No need to dump this data into any table, just use performance schema's replication tables https://dev.mysql.com/doc/refman/5.7/en/performance-schema-replication-tables.html – Shadow Jan 12 '22 at 15:07
  • @Shadow I queried every single table from that article (both on master and replica) and there is no data in any of them. – Dmitrij Kultasev Jan 12 '22 at 15:38
  • 1
    Then you need to enable performance schema. See mysql manual on how to do that. – Shadow Jan 12 '22 at 16:06
  • The question still remain, we can't enable `performance_schema` now – Dmitrij Kultasev Jan 13 '22 at 08:23
  • 1
    Then you are out of luck. That's the way mysql provides to access the same information via select queries. – Shadow Jan 13 '22 at 08:31

0 Answers0