When running Zabbix Web connected to a DigitalOcean Managed Database, you get an error with the query
SHOW VARIABLES LIKE "character_set_database" in include/db.inc.php on line 248.
The MySQL version is 8.0.30.
An easy fix is to change the code snippet in db.inc.php line 248:
OLD
try {
$result = mysqli_query($DB['DB'], $query);
}
NEW
try {
if($query == 'SHOW VARIABLES LIKE "character_set_database"') {
$query = str_replace('"', "'", $query);
}
$result = mysqli_query($DB['DB'], $query);
}
I have indicated to DigitalOcean that their Managed DB product is not 100% compatible. The MySQL documentation states:
A string is a sequence of bytes or characters, enclosed within either single quote (') or double quote (") characters.
SHOW VARIABLES LIKE "character_set_database" in include/db.inc.php on line 248.
The MySQL version is 8.0.30.
An easy fix is to change the code snippet in db.inc.php line 248:
OLD
try {
$result = mysqli_query($DB['DB'], $query);
}
NEW
try {
if($query == 'SHOW VARIABLES LIKE "character_set_database"') {
$query = str_replace('"', "'", $query);
}
$result = mysqli_query($DB['DB'], $query);
}
I have indicated to DigitalOcean that their Managed DB product is not 100% compatible. The MySQL documentation states:
A string is a sequence of bytes or characters, enclosed within either single quote (') or double quote (") characters.