Keine Cache-Version


Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code DEF204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.

Rechercher dans le manuel MySQL

17.1.4.3 Multi-Source Replication Monitoring

To monitor the status of replication channels the following options exist:

  • Using the replication Performance Schema tables. The first column of these tables is Channel_Name. This enables you to write complex queries based on Channel_Name as a key. See Section 26.12.11, “Performance Schema Replication Tables”.

  • Using SHOW SLAVE STATUS FOR CHANNEL channel. By default, if the FOR CHANNEL channel clause is not used, this statement shows the slave status for all channels with one row per channel. The identifier Channel_name is added as a column in the result set. If a FOR CHANNEL channel clause is provided, the results show the status of only the named replication channel.

Note

The SHOW VARIABLES statement does not work with multiple replication channels. The information that was available through these variables has been migrated to the replication performance tables. Using a SHOW VARIABLES statement in a topology with multiple channels shows the status of only the default channel.

17.1.4.3.1 Monitoring Channels Using Performance Schema Tables

This section explains how to use the replication Performance Schema tables to monitor channels. You can choose to monitor all channels, or a subset of the existing channels.

To monitor the connection status of all channels:

  1. mysql> SELECT * FROM replication_connection_status\G;
  2. *************************** 1. row ***************************
  3. CHANNEL_NAME: master1
  4. GROUP_NAME:
  5. SOURCE_UUID: 046e41f8-a223-11e4-a975-0811960cc264
  6. THREAD_ID: 24
  7. SERVICE_STATE: ON
  8. COUNT_RECEIVED_HEARTBEATS: 0
  9. LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00
  10. RECEIVED_TRANSACTION_SET: 046e41f8-a223-11e4-a975-0811960cc264:4-37
  11. LAST_ERROR_NUMBER: 0
  12. LAST_ERROR_MESSAGE:
  13. LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
  14. *************************** 2. row ***************************
  15. CHANNEL_NAME: master2
  16. GROUP_NAME:
  17. SOURCE_UUID: 7475e474-a223-11e4-a978-0811960cc264
  18. THREAD_ID: 26
  19. SERVICE_STATE: ON
  20. COUNT_RECEIVED_HEARTBEATS: 0
  21. LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00
  22. RECEIVED_TRANSACTION_SET: 7475e474-a223-11e4-a978-0811960cc264:4-6
  23. LAST_ERROR_NUMBER: 0
  24. LAST_ERROR_MESSAGE:
  25. LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
  26. 2 rows in set (0.00 sec)

In the above output there are two channels enabled, and as shown by the CHANNEL_NAME field they are called master1 and master2.

The addition of the CHANNEL_NAME field enables you to query the Performance Schema tables for a specific channel. To monitor the connection status of a named channel, use a WHERE CHANNEL_NAME=channel clause:

  1. mysql> SELECT * FROM replication_connection_status WHERE CHANNEL_NAME='master1'\G
  2. *************************** 1. row ***************************
  3. CHANNEL_NAME: master1
  4. GROUP_NAME:
  5. SOURCE_UUID: 046e41f8-a223-11e4-a975-0811960cc264
  6. THREAD_ID: 24
  7. SERVICE_STATE: ON
  8. COUNT_RECEIVED_HEARTBEATS: 0
  9. LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00
  10. RECEIVED_TRANSACTION_SET: 046e41f8-a223-11e4-a975-0811960cc264:4-37
  11. LAST_ERROR_NUMBER: 0
  12. LAST_ERROR_MESSAGE:
  13. LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
  14. 1 row in set (0.00 sec)

Similarly, the WHERE CHANNEL_NAME=channel clause can be used to monitor the other replication Performance Schema tables for a specific channel. For more information, see Section 26.12.11, “Performance Schema Replication Tables”.


Suchen Sie im MySQL-Handbuch

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 26/06/2006, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/mysql-rf-replication-multi-source-monitoring.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:en Manuel MySQL : https://dev.mysql.com/

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut