Anda harus mengatur replikasi MySQL (master/slave) dan menjalankan kueri hanya pada master DB. Lihat dokumentasi:http://dev.mysql.com/ doc/refman/5.1/en/replication-howto.html
Hanya untuk 1 kali query, ganti baris:
mysqli_query($db_connect2,"UPDATE ipserver SET ipsserver = ($db_connect1,"SELECT ipsserver FROM ipserver WHERE idserver = '11'") WHERE idserver = '11'");
dengan kode ini:
$result = mysqli_query(
$db_connect1,
"SELECT ipsserver FROM ipserver WHERE idserver='11'"
);
while ($row=$result->fetch_assoc()) {
$ipsserver = $row["ipsserver"];
mysqli_query(
$db_connect2,
"UPDATE ipserver SET ipsserver='$ipsserver' WHERE idserver='11'"
);
}