From 3784abde343f22932a67da0257e3e0ad5fde1465 Mon Sep 17 00:00:00 2001 From: Jan Skrasek Date: Fri, 10 Apr 2020 16:32:11 +0200 Subject: [PATCH] mysql: correctly detect new connection error with MySQL 8 "The server requested auth entication method unknown to the client" --- src/Drivers/Mysqli/MysqliDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Drivers/Mysqli/MysqliDriver.php b/src/Drivers/Mysqli/MysqliDriver.php index 49524287..949e4b3c 100644 --- a/src/Drivers/Mysqli/MysqliDriver.php +++ b/src/Drivers/Mysqli/MysqliDriver.php @@ -407,7 +407,7 @@ protected function createException(string $error, int $errorNo, string $sqlState } elseif (in_array($errorNo, [1062, 1557, 1569, 1586], true)) { return new UniqueConstraintViolationException($error, $errorNo, $sqlState, null, $query); - } elseif (in_array($errorNo, [1044, 1045, 1046, 1049, 1095, 1142, 1143, 1227, 1370, 2002, 2005], true)) { + } elseif (in_array($errorNo, [1044, 1045, 1046, 1049, 1095, 1142, 1143, 1227, 1370, 2002, 2005, 2054], true)) { return new ConnectionException($error, $errorNo, $sqlState); } elseif (in_array($errorNo, [1048, 1121, 1138, 1171, 1252, 1263, 1566], true)) {