В моем случае, помимо вышеупомянутого сообщения об ошибке, я также получил предупреждения ниже:
PHP Warning: mysqli_real_connect(): Server sent charset (255) unknown to the client. Please, report to the developers in /var/www/html/wp-includes/wp-db.php on line 1531
Warning: mysqli_real_connect(): Server sent charset (255) unknown to the client. Please, report to the developers in /var/www/html/wp-includes/wp-db.php on line 1531
PHP Warning: mysqli_real_connect(): (HY000/2054): Server sent charset unknown to the client. Please, report to the developers in /var/www/html/wp-includes/wp-db.php on line 1531
Warning: mysqli_real_connect(): (HY000/2054): Server sent charset unknown to the client. Please, report to the developers in /var/www/html/wp-includes/wp-db.php on line 1531
PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/www/html/wp-includes/wp-db.php on line 1562
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/www/html/wp-includes/wp-db.php on line 1562
PHP Warning: mysql_connect(): Server sent charset (255) unknown to the client. Please, report to the developers in /var/www/html/wp-includes/wp-db.php on line 1562
Warning: mysql_connect(): Server sent charset (255) unknown to the client. Please, report to the developers in /var/www/html/wp-includes/wp-db.php on line 1562
PHP Warning: mysql_connect(): Server sent charset unknown to the client. Please, report to the developers in /var/www/html/wp-includes/wp-db.php on line 1562
Warning: mysql_connect(): Server sent charset unknown to the client. Please, report to the developers in /var/www/html/wp-includes/wp-db.php on line 1562
В соответствии с этим вопросом эта проблема возникает из-за того, что по умолчанию для MySQL 8.0 используется кодировка utfmb4
.
Фактически, я мог повторить ошибку, обновив MySQL 5.7 до MySQL 8.0
Я решил проблему, экспортировав базу данных, опустившись до MySQL 5.7 и повторно импортировав данные. Я также провел тесты на MariaDB 10.3, и он отлично работает.