MySQL 8.0 и PHP 5.3
Добавлено: 15 сен 2023, 17:49
				
				Существует ли способ решения проблемы без перехода на более свежую версию PHP?
Установлен OpenServer 5,3,8.
Интерпретатор PHP 5.3.29 (cli)
Выполняемый код:
			Установлен OpenServer 5,3,8.
Интерпретатор PHP 5.3.29 (cli)
Выполняемый код:
<?php
$db1 = mysql_connect('localhost', 'root', 'root');
mysql_select_db('demo');
$db2 = new mysqli('localhost', 'root', 'root', 'demo');
$db3 = new PDO('mysql:dbname=demo;host=localhost', 'root', 'root');
При попытке подключиться к MySQL 8.0 выскакивают сообщения об ошибках:Warning: mysql_connect(): Server sent charset (255) unknown to the client. Please, report to the developers in D:\OpenServer\domains\test.tst\test2.tst.php on line 3
Warning: mysql_connect(): Server sent charset unknown to the client. Please, report to the developers in D:\OpenServer\domains\test.tst\test2.tst.php on line 3
Warning: mysql_select_db(): Server sent charset (255) unknown to the client. Please, report to the developers in D:\OpenServer\domains\test.tst\test2.tst.php on line 4
Warning: mysql_select_db(): Server sent charset unknown to the client. Please, report to the developers in D:\OpenServer\domains\test.tst\test2.tst.php on line 4
Warning: mysql_select_db(): A link to the server could not be established in D:\OpenServer\domains\test.tst\test2.tst.php on line 4
Warning: mysqli::mysqli(): Server sent charset (255) unknown to the client. Please, report to the developers in D:\OpenServer\domains\test.tst\test2.tst.php on line 6
Warning: mysqli::mysqli(): (HY000/2054): Server sent charset unknown to the client. Please, report to the developers in D:\OpenServer\domains\test.tst\test2.tst.php on line 6
Warning: PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers in D:\OpenServer\domains\test.tst\test2.tst.php on line 8
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers' in D:\OpenServer\domains\test.tst\test2.tst.php:8
Stack trace:
#0 D:\OpenServer\domains\test.tst\test2.tst.php(8): PDO->__construct('mysql:dbname=de...', 'root', 'root')
#1 {main}
thrown in D:\OpenServer\domains\test.tst\test2.tst.php on line 8