{"id":200,"date":"2009-11-11T15:21:25","date_gmt":"2009-11-11T15:21:25","guid":{"rendered":"http:\/\/kedar.nitty-witty.com\/?p=200"},"modified":"2014-06-24T18:58:57","modified_gmt":"2014-06-24T18:58:57","slug":"monitor-mysql-replication-using-php","status":"publish","type":"post","link":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php","title":{"rendered":"Monitor multiple mysql replication using php: Updated"},"content":{"rendered":"<p>Monitoring a replication is an important aspect. As replication includes multiple nodes, it is essential to track activity and status across all mysql servers involved in replication.<\/p>\n<p>To monitor replication we know commands like:<\/p>\n<p><span style=\"color: #999999;\">Show slave status;<\/span><\/p>\n<p><span style=\"color: #999999;\">Show master status;<\/span><\/p>\n<p>Refer: http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/sql-syntax-replication.html<\/p>\n<p>But when it comes to non-gui interface, it becomes little tedious.<\/p>\n<p>With some efforts, I managed to make a php script to monitor mysql servers.<\/p>\n<p>It can:<\/p>\n<ul>\n<li>Get per second status of slaves.<\/li>\n<li>Start \/ Stop slave from any of the mysql servers in replication.<\/li>\n<li>Display error number along with description in case of error in replication.<\/li>\n<li>Shows detailed information of both the server\u2019s global status variables.<\/li>\n<\/ul>\n<p>Well there is no fancy UI, my bad, but it works for me. I&#8217;ll try to make it better, may be you can suggest.<\/p>\n<p><strong>Code: <\/strong><\/p>\n<p>[ Download here: <a href=\"http:\/\/kedar.nitty-witty.com\/wp-content\/uploads\/2009\/11\/monitor-replication.txt\" target=\"_blank\">monitor-replication.txt<\/a>] ( ** Check Updated Monitoring Script. )<\/p>\n<p><span style=\"color: #999999;\">&lt;?php<\/span><\/p>\n<p><span style=\"color: #999999;\"> #Resets warning messages<\/span><\/p>\n<p><span style=\"color: #999999;\">error_reporting(E_ALL ^ E_NOTICE);<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">#Function to display slave status.<\/span><\/p>\n<p><span style=\"color: #999999;\">function slavestatus($host,$username,$password,$slaveport=3306)<\/span><\/p>\n<p><span style=\"color: #999999;\">{<\/span><\/p>\n<p><span style=\"color: #999999;\">$con=mysql_connect(&#8220;$host:$slaveport&#8221;,$username,$password)<\/span><\/p>\n<p><span style=\"color: #999999;\">or die(&#8220;can&#8217;t connect server&#8221;);<\/span><\/p>\n<p><span style=\"color: #999999;\">$result=mysql_query(&#8220;show slave status&#8221;);<\/span><\/p>\n<p><span style=\"color: #999999;\">$timeResult=mysql_query(&#8220;select now()&#8221;);<\/span><\/p>\n<p><span style=\"color: #999999;\">$time=mysql_result($timeResult,0,0);<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">while($status = mysql_fetch_array($result))<\/span><\/p>\n<p><span style=\"color: #999999;\">{<\/span><\/p>\n<p><span style=\"color: #999999;\">$file=$status[5];<\/span><\/p>\n<p><span style=\"color: #999999;\">$position=$status[6];<\/span><\/p>\n<p><span style=\"color: #999999;\">$sql_run=$status[10];<\/span><\/p>\n<p><span style=\"color: #999999;\">$io_run=$status[11];<\/span><\/p>\n<p><span style=\"color: #999999;\">$errorNum=$status[18];<\/span><\/p>\n<p><span style=\"color: #999999;\">$errorMeg=$status[19];<\/span><\/p>\n<p><span style=\"color: #999999;\">}<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">print &#8220;&lt;tr align=center&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;td&gt; $time &lt;\/td&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;td&gt; $host : $slaveport &lt;\/td&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;td&gt; $file &lt;\/td&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;td&gt; $position &lt;\/td&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;td&gt; $sql_run &lt;\/td&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;td&gt; $io_run &lt;\/td&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;td&gt; $errorNum &lt;\/td&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;td&gt; $errorMeg &lt;\/td&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;td&gt; &lt;form name=&#8217;form&#8217; action=&#8217;#&#8217; method=&#8217;POST&#8217;&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;input type=&#8217;submit&#8217; name=&#8217;stop&#8217;\u00a0 id=&#8217;stop&#8217;\u00a0 value=\\&#8221;STOP $host:$slaveport\\&#8221;&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;input type=&#8217;submit&#8217; name=&#8217;start&#8217;\u00a0 id=&#8217;start&#8217;\u00a0 value=\\&#8221;START $host:$slaveport\\&#8221;&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;\/form&gt; &lt;\/td&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;td&gt; &lt;a href=&#8217;?detail=$host:$slaveport&#8217;&gt; detailed &lt;\/a&gt;&lt;\/td&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;\/tr&gt;&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">}<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">#Function for starting and stopping mysql server.<\/span><\/p>\n<p><span style=\"color: #999999;\">function start_stop($machine,$username,$password,$task=&#8217;no&#8217;)<\/span><\/p>\n<p><span style=\"color: #999999;\">{<\/span><\/p>\n<p><span style=\"color: #999999;\">if($task==&#8217;no&#8217;) exit;<\/span><\/p>\n<p><span style=\"color: #999999;\">$con=mysql_connect($machine,$username,$password) or die(&#8220;can&#8217;t connect server&#8221;);<\/span><\/p>\n<p><span style=\"color: #999999;\">$sql= $task . &#8221; slave&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">$result=mysql_query($sql);<\/span><\/p>\n<p><span style=\"color: #999999;\">$_POST = array();<\/span><\/p>\n<p><span style=\"color: #999999;\">$task=&#8221;no&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">$VAR=$_SERVER[&#8220;REQUEST_URI&#8221;];<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">#Refreshes page, updates server status in table.<\/span><\/p>\n<p><span style=\"color: #999999;\">header(&#8216;refresh: 1; url=&#8217;.$VAR);<\/span><\/p>\n<p><span style=\"color: #999999;\">}<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">#Function for showing detailed status<\/span><\/p>\n<p><span style=\"color: #999999;\">function get_status($machine,$username,$password)<\/span><\/p>\n<p><span style=\"color: #999999;\">{<\/span><\/p>\n<p><span style=\"color: #999999;\">$hostname = $_SERVER[&#8216;SCRIPT_NAME&#8217;];<\/span><\/p>\n<p><span style=\"color: #999999;\">echo &#8220;&lt;center&gt;&lt;a href=\\&#8221;$hostname\\&#8221;&gt;Reset&lt;\/a&gt;&lt;\/center&gt;&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">if($task==&#8217;no&#8217;) exit;<\/span><\/p>\n<p><span style=\"color: #999999;\">$con=mysql_connect($machine,$username,$password) or die(&#8220;can&#8217;t connect server&#8221;);<\/span><\/p>\n<p><span style=\"color: #999999;\">$sql=&#8221;show global status&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">echo &#8220;&lt;table border=1 align=center&gt;&lt;tr&gt;&lt;th&gt;Variable&lt;\/th&gt;&lt;th&gt;Value&lt;\/th&gt;&lt;\/tr&gt;&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">$res=mysql_query($sql);<\/span><\/p>\n<p><span style=\"color: #999999;\">while($row = mysql_fetch_assoc($res))<\/span><\/p>\n<p><span style=\"color: #999999;\">{<\/span><\/p>\n<p><span style=\"color: #999999;\">echo &#8216;&lt;tr align=center&gt;&lt;td&gt;&#8217;.$row[&#8216;Variable_name&#8217;].<\/span><\/p>\n<p><span style=\"color: #999999;\">&#8216;&lt;\/td&gt;&lt;td&gt;&#8217;.$row[&#8216;Value&#8217;].'&lt;\/td&gt;&lt;\/tr&gt;&#8217;;<\/span><\/p>\n<p><span style=\"color: #999999;\">}<\/span><\/p>\n<p><span style=\"color: #999999;\">echo &#8220;&lt;\/table&gt;&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">#$_POST = array();<\/span><\/p>\n<p><span style=\"color: #999999;\">$task=&#8221;no&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">}<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">echo &#8216;&lt;html&gt;&#8217;;<\/span><\/p>\n<p><span style=\"color: #999999;\">if(!isset($_GET[&#8216;detail&#8217;]))<\/span><\/p>\n<p><span style=\"color: #999999;\">{<\/span><\/p>\n<p><span style=\"color: #999999;\">#Auto refreshing page for continuous status<\/span><\/p>\n<p><span style=\"color: #999999;\">#content=&#8221;3;&#8221; page refreshes after 3 seconds<\/span><\/p>\n<p><span style=\"color: #999999;\">echo &#8216;&lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;3;&#8221;&gt;&#8217;;<\/span><\/p>\n<p><span style=\"color: #999999;\">}<\/span><\/p>\n<p><span style=\"color: #999999;\">echo'&lt;body&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;h1&gt;&lt;font face=&#8221;verdana&#8221; size=10&gt;&lt;small&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">MySQL Replication Monitor&lt;\/small&gt;&lt;\/font&gt;&lt;\/h1&gt;&#8217;;<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">#host-name &amp; ports for replication servers<\/span><\/p>\n<p><span style=\"color: #999999;\">$slave = &#8220;localhost&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">$master = &#8220;localhost&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">$slaveport=3306;<\/span><\/p>\n<p><span style=\"color: #999999;\">$masterport=3307;<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">#considered a common username password for accessing both servers<\/span><\/p>\n<p><span style=\"color: #999999;\">$username=&#8221;root&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">$password=&#8221;kedar&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">print &#8220;&lt;table border=1&gt;&lt;tr&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;th&gt; time &lt;\/th&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;th&gt; host : port &lt;\/th&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;th&gt; file &lt;\/th&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;th&gt; position &lt;\/th&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;th&gt; io run &lt;\/th&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;th&gt; sql run &lt;\/th&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;th&gt; errorNum &lt;\/th&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;th&gt; errorMeg &lt;\/th&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;th&gt; Stop \/ Start &lt;\/th&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;th&gt; Extra &lt;\/th&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;\/tr&gt;&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">slavestatus($slave,$username,$password,$slaveport);<\/span><\/p>\n<p><span style=\"color: #999999;\">slavestatus($master,$username,$password,$masterport);<\/span><\/p>\n<p><span style=\"color: #999999;\">print &#8220;&lt;\/table&gt;&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">if (isset($_POST[&#8216;start&#8217;])) {<\/span><\/p>\n<p><span style=\"color: #999999;\">list($task,$machine)=split(&#8221; &#8220;,$_POST[&#8216;start&#8217;]);<\/span><\/p>\n<p><span style=\"color: #999999;\">start_stop($machine,$username,$password,$task);<\/span><\/p>\n<p><span style=\"color: #999999;\">}<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">if (isset($_POST[&#8216;stop&#8217;])) {<\/span><\/p>\n<p><span style=\"color: #999999;\">list($task,$machine)=split(&#8221; &#8220;,$_POST[&#8216;stop&#8217;]);<\/span><\/p>\n<p><span style=\"color: #999999;\">start_stop($machine,$username,$password,$task);<\/span><\/p>\n<p><span style=\"color: #999999;\">}<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">if (isset($_GET[&#8216;detail&#8217;])) {<\/span><\/p>\n<p><span style=\"color: #999999;\">echo &#8220;&lt;br&gt;&lt;center&gt;&lt;b&gt;Showing global status for: &#8220;.<\/span><\/p>\n<p><span style=\"color: #999999;\">$_GET[&#8216;detail&#8217;] . &#8220;&lt;\/b&gt;&lt;\/center&gt;&lt;br&gt;&#8221;;<\/span><\/p>\n<p><span style=\"color: #999999;\">get_status($_GET[&#8216;detail&#8217;],$username,$password);<\/span><\/p>\n<p><span style=\"color: #999999;\">}<\/span><\/p>\n<p><span style=\"color: #999999;\"> <\/span><\/p>\n<p><span style=\"color: #999999;\">echo &#8216;&lt;div align=right&gt;&lt;font face=&#8221;verdana&#8221; color=&#8221;gray&#8221; size=&#8221;2px&#8221;&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">Kedar.&lt;\/div&gt;&lt;\/div&gt;&lt;\/body&gt;<\/span><\/p>\n<p><span style=\"color: #999999;\">&lt;\/html&gt;&#8217;;<\/span><\/p>\n<p><span style=\"color: #999999;\">?&gt;<\/span><\/p>\n<p><strong><big>Update: <\/big> Above script with little changes for monitoring more mysql servers using php script with easiest possible configuration.<\/strong><br \/>\n<strong>Download: <\/strong> <a href=\"http:\/\/kedar.nitty-witty.com\/wp-content\/uploads\/2009\/11\/MySQL-replication-monitoring-PHP-Script.zip\">MySQL-replication-monitoring-PHP-Script<\/a>.\u00a0 ( ** Check Updated Monitoring Script. )<\/p>\n<p>The script give reads server configurations from a config file &#8216;replmon_conf.txt&#8217; and thus facilitate to monitor simultaneously any number of mysql database servers.<\/p>\n<p>You have to specify connection parameters in replmon_conf.txt as follows:<br \/>\nhostname,username,password,port<\/p>\n<p>To monitor more than one mysql database servers you just need to add one more line of connection parameters.<br \/>\nHope this helps.<\/p>\n<p>Update 2:\u00a0 Tookout some time and modified the script for monitoring mysql replication using php. <span style=\"color: #00ff00;\"> <\/span><\/p>\n<h2><span style=\"color: #00ff00;\">Download mysql monitor using php: <a href=\"http:\/\/kedar.nitty-witty.com\/wp-content\/uploads\/2009\/11\/mysql-replication-monitor-php.zip\">mysql replication monitor php<\/a><\/span><\/h2>\n","protected":false},"excerpt":{"rendered":"Monitoring a replication is an important aspect. As replication includes multiple nodes, it is essential to track activity and status across all mysql servers involved in replication. To monitor replication&hellip;\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[8,378],"tags":[70,264,427,263,85,100,265],"class_list":["post-200","post","type-post","status-publish","format-standard","category-mysql","category-mysql-scripts-mysql","tag-monitor","tag-monitor-replication","tag-mysql","tag-mysql-replication-monitor","tag-php","tag-replication","tag-replication-monitor-in-php"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Download free php script to monitor multiple mysql replication.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Kedar\"\/>\n\t<meta name=\"google-site-verification\" content=\"_Bu1h5r0PxIC0D2jBVdmYN45RTeG9ogcX85XLkbG1qA\" \/>\n\t<meta name=\"msvalidate.01\" content=\"116B62074CBCA1BA99B8CCE09CCF2FB8\" \/>\n\t<meta name=\"keywords\" content=\"php replication monitor,mysql replication monitor,mysql replication,download,php mysql,replication monitor,monitor,monitor replication,mysql,php,replication,replication monitor in php\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Change Is Inevitable | Kedar Vaijanapurkar&#039;s Blog for MySQL, technology and various subjects\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Monitor multiple mysql replication using php: Updated | Change Is Inevitable\" \/>\n\t\t<meta property=\"og:description\" content=\"Download free php script to monitor multiple mysql replication.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2009-11-11T15:21:25+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2014-06-24T18:58:57+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Monitor multiple mysql replication using php: Updated | Change Is Inevitable\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Download free php script to monitor multiple mysql replication.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#article\",\"name\":\"Monitor multiple mysql replication using php: Updated | Change Is Inevitable\",\"headline\":\"Monitor multiple mysql replication using php: Updated\",\"author\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"},\"datePublished\":\"2009-11-11T15:21:25+00:00\",\"dateModified\":\"2014-06-24T18:58:57+00:00\",\"inLanguage\":\"en-US\",\"commentCount\":12,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#webpage\"},\"articleSection\":\"MySQL, MySQL-Scripts, monitor, monitor replication, MySQL, mysql replication monitor, php, replication, replication monitor in php\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"position\":2,\"name\":\"MySQL\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-scripts-mysql#listItem\",\"name\":\"MySQL-Scripts\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-scripts-mysql#listItem\",\"position\":3,\"name\":\"MySQL-Scripts\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-scripts-mysql\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#listItem\",\"name\":\"Monitor multiple mysql replication using php: Updated\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#listItem\",\"position\":4,\"name\":\"Monitor multiple mysql replication using php: Updated\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-scripts-mysql#listItem\",\"name\":\"MySQL-Scripts\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\",\"name\":\"Kedar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin\",\"name\":\"Kedar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#webpage\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php\",\"name\":\"Monitor multiple mysql replication using php: Updated | Change Is Inevitable\",\"description\":\"Download free php script to monitor multiple mysql replication.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/monitor-mysql-replication-using-php#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"datePublished\":\"2009-11-11T15:21:25+00:00\",\"dateModified\":\"2014-06-24T18:58:57+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/\",\"name\":\"..::CHANGE is INEVITABLE::..\",\"description\":\"Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Monitor multiple mysql replication using php: Updated | Change Is Inevitable","description":"Download free php script to monitor multiple mysql replication.","canonical_url":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php","robots":"max-image-preview:large","keywords":"php replication monitor,mysql replication monitor,mysql replication,download,php mysql,replication monitor,monitor,monitor replication,mysql,php,replication,replication monitor in php","webmasterTools":{"google-site-verification":"_Bu1h5r0PxIC0D2jBVdmYN45RTeG9ogcX85XLkbG1qA","msvalidate.01":"116B62074CBCA1BA99B8CCE09CCF2FB8","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#article","name":"Monitor multiple mysql replication using php: Updated | Change Is Inevitable","headline":"Monitor multiple mysql replication using php: Updated","author":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"publisher":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"},"datePublished":"2009-11-11T15:21:25+00:00","dateModified":"2014-06-24T18:58:57+00:00","inLanguage":"en-US","commentCount":12,"mainEntityOfPage":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#webpage"},"isPartOf":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#webpage"},"articleSection":"MySQL, MySQL-Scripts, monitor, monitor replication, MySQL, mysql replication monitor, php, replication, replication monitor in php"},{"@type":"BreadcrumbList","@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/kedar.nitty-witty.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","position":2,"name":"MySQL","item":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql#listItem","name":"MySQL-Scripts"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql#listItem","position":3,"name":"MySQL-Scripts","item":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#listItem","name":"Monitor multiple mysql replication using php: Updated"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#listItem","position":4,"name":"Monitor multiple mysql replication using php: Updated","previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql#listItem","name":"MySQL-Scripts"}}]},{"@type":"Person","@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person","name":"Kedar","image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"}},{"@type":"Person","@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author","url":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin","name":"Kedar","image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"}},{"@type":"WebPage","@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#webpage","url":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php","name":"Monitor multiple mysql replication using php: Updated | Change Is Inevitable","description":"Download free php script to monitor multiple mysql replication.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php#breadcrumblist"},"author":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"creator":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"datePublished":"2009-11-11T15:21:25+00:00","dateModified":"2014-06-24T18:58:57+00:00"},{"@type":"WebSite","@id":"https:\/\/kedar.nitty-witty.com\/blog\/#website","url":"https:\/\/kedar.nitty-witty.com\/blog\/","name":"..::CHANGE is INEVITABLE::..","description":"Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects","inLanguage":"en-US","publisher":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Change Is Inevitable | Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects","og:type":"article","og:title":"Monitor multiple mysql replication using php: Updated | Change Is Inevitable","og:description":"Download free php script to monitor multiple mysql replication.","og:url":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php","article:published_time":"2009-11-11T15:21:25+00:00","article:modified_time":"2014-06-24T18:58:57+00:00","twitter:card":"summary","twitter:title":"Monitor multiple mysql replication using php: Updated | Change Is Inevitable","twitter:description":"Download free php script to monitor multiple mysql replication."},"aioseo_meta_data":{"post_id":"200","title":"Monitor multiple mysql replication using php: Updated | #site_title","description":"Download free php script to monitor multiple mysql replication.","keywords":[{"label":"php replication monitor","value":"php replication monitor"},{"label":"mysql replication monitor","value":"mysql replication monitor"},{"label":"mysql replication","value":"mysql replication"},{"label":"download","value":"download"},{"label":"php mysql","value":"php mysql"},{"label":"replication monitor","value":"replication monitor"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-24 17:44:00","updated":"2025-08-16 19:01:23","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\" title=\"MySQL\">MySQL<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql\" title=\"MySQL-Scripts\">MySQL-Scripts<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMonitor multiple mysql replication using php: Updated\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/kedar.nitty-witty.com\/blog"},{"label":"MySQL","link":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql"},{"label":"MySQL-Scripts","link":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql"},{"label":"Monitor multiple mysql replication using php: Updated","link":"https:\/\/kedar.nitty-witty.com\/blog\/monitor-mysql-replication-using-php"}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/comments?post=200"}],"version-history":[{"count":8,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/200\/revisions"}],"predecessor-version":[{"id":1973,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/200\/revisions\/1973"}],"wp:attachment":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/categories?post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/tags?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}