Question: What happens if you have two mysql database with replication, they stop replicating and you do not notice?
Answer: you get into trouble....
Here is a small script to help you stay informed...
#!/usr/bin/php
/* Connessione e selezione del database */
$connessione = mysql_connect("localhost", "root", "secretpw")
or die("Connessione non riuscita");
print "Connesso con successo\n";
/* Esecuzione di una query SQL */
$query = "SHOW SLAVE STATUS";
$risultato = mysql_query($query) or die("Query fallita");
$slaveok=0;
while ($row = mysql_fetch_array($risultato, MYSQL_ASSOC)) {
print "Slave is running: ".$row["Slave_Running"] . "\n";
print "Last error : ".$row["Last_error"] . "\n";
if ($row["Slave_Running"]=="Yes" && $row["Last_error"]==...