Change Is Inevitable
  • Home
  • MySQL
    • MySQL-Articles
    • AWS RDS
    • Percona Xtradb Cluster
    • MariaDB
    • Galera Cluster
    • ProxySQL
    • MySQL-Scripts
    • MySQL tools
    • MySQL Resources
  • Tools
    • MySQL Advisor
    • MySQL Random Data Generator
    • Postgresql Random Data Generator
    • Clean Prompt
  • General
    • binary-to-decimal
    • Fermat’s Theorem
    • Review
    • Just for fun
    • Personal
  • Contact Me
    • Copyright
    • MySQL Podcast (Youtube)
    • MySQL Podcast (Spotify)
Recent Posts
  • MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • How to setup and use Percona Binlog Server (PBS)
  • MySQL Major Version Upgrade Checklist – how to
  • InnoDB Flushing is simple – explained
  • MySQL Tools for Performance Tuning and Test Data Generation
Recent Comments
  • Kedar on MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • Jean-François Gagné on MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • Reggie on A Unique Foreign Key issue in MySQL 8.4
  • Kedar on How to fix write latency in MySQL 8.4 Upgrade
  • Kedar on How to fix write latency in MySQL 8.4 Upgrade
Home » php script
Change Is Inevitable

Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects

  • Home
  • MySQL
    • MySQL-Articles
    • AWS RDS
    • Percona Xtradb Cluster
    • MariaDB
    • Galera Cluster
    • ProxySQL
    • MySQL-Scripts
    • MySQL tools
    • MySQL Resources
  • Tools
    • MySQL Advisor
    • MySQL Random Data Generator
    • Postgresql Random Data Generator
    • Clean Prompt
  • General
    • binary-to-decimal
    • Fermat’s Theorem
    • Review
    • Just for fun
    • Personal
  • Contact Me
    • Copyright
    • MySQL Podcast (Youtube)
    • MySQL Podcast (Spotify)

Browsing Tag

php script

1 post

MySQL master master replication monitor with php code

  • Kedar
  • December 4, 2009
For monitoring replication we know a lot of tools and codes – but this one is different because I wrote it 😉 Well this is fairly simple php code for…
View Post
MySQL Podcast (Youtube)
RSS feed: MySQL Podcast (Spotify) MySQL Podcast (Spotify)
  • MySQL Major Version Upgrade Checklist (Zero Downtime Strategy)
    Upgrading MySQL major versions in production is never just a version bump - it’s a carefully planned process involving compatibility checks, replication strategy, testing, and controlled cut-over.In this episode, we walk through a practical MySQL Major Version Upgrade Checklist based on real-world DBA workflows. We are covering MySQL replication as base setup for upgrade. It […]
Search:
... ...
  • MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • How to setup and use Percona Binlog Server (PBS)
  • MySQL Major Version Upgrade Checklist – how to
  • InnoDB Flushing is simple – explained
  • MySQL Tools for Performance Tuning and Test Data Generation

8 responses to “MySQL master master replication monitor with php code”

  1. Siddharth Avatar
    Siddharth
    March 31, 2016

    Ok. thx, Issue resolved.

    Reply
  2. Siddharth Avatar
    Siddharth
    March 30, 2016

    Thx for the help kedar, we have our own alerting system, we are implementing this to monitor error , logs position & start / stop slave things handy, rather than giving server access to users.

    I tried to install this script on our server but file , position , IO run , sql run , error number & error message fields are getting blank. i have mysql version 5.6.26 on centos .

    Can you please help me to solve this ?

    Reply
    1. Kedar Avatar
      Kedar
      March 31, 2016

      Sure Siddharth,

      You need to make sure your credentials are correct and in place. You need to change following:

      #host-name & ports for replication servers
      $slave = “localhost”; # Provide IP / FQDN
      $master = “localhost”;# Provide IP / FQDN
      $slaveport=3306; # If both mysql are on different node then port should be default 3306 for both masters.
      $masterport=3307;

      #considered a common username password for accessing both servers#
      $username=”user”;
      $password=”xx”;
      >> Make sure these credentials above works. Say you’re having the script on remote machine then you should be able to connect to both masters using this credentials.

      Let me know.

      Reply
  3. Siddharth Avatar
    Siddharth
    March 29, 2016

    Hi kedar,

    Can i monitor master master replication with this script ?

    Reply
    1. Kedar Avatar
      Kedar
      March 30, 2016

      Hi Siddharth,

      This has been pretty old script and things have evolved. What’s importantly missing here is alert mechanism. You do not get alerted for any issues found unless you view the page.
      If you want to use this, you better add a function to send-out email/msg.

      That said, this only is limited to replication; there are other monitoring tool which monitors much more than just replication status and that is desired. Nagios with Percona monitoring plugins is one way to implement.

      Hope this helps,
      Kedar.

      Reply
  4. email to fax Avatar
    email to fax
    May 17, 2013

    Hi, Thank you for this script

    Reply
  5. elavarasan Avatar
    elavarasan
    August 3, 2011

    I am not able to download the mysql-replication-monitor.php, so please reload or provide direct link

    thanks,
    elavarasan

    Reply
    1. Kedar Avatar
      Kedar
      August 3, 2011

      Hi mselavarasan,

      Please check now. I’ve fixed it.

      Cheers,
      Kedar.

      Reply
Change Is Inevitable
Designed & Developed by Code Supply Co.