Skip to content

Instantly share code, notes, and snippets.

View capkuan's full-sized avatar
🥑
Hello world

Luong Quan capkuan

🥑
Hello world
View GitHub Profile
@capkuan
capkuan / slave_status.php
Last active November 9, 2018 04:50 — forked from tom--/slave_status.php
Test a MySQL replication slave's status
#!/usr/local/bin/php
<?php
$error = false;
$errno = 0;
try {
$db = new PDO('mysql:dbname=stations;host=localhost', 'root', 'password');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
/** @var $slave_status StdClass */