Skip to content

Commit

Permalink
mysql: correctly detect new connection error with MySQL 8
Browse files Browse the repository at this point in the history
"The server requested auth entication method unknown to the client"
  • Loading branch information
hrach committed Apr 10, 2020
1 parent 470731f commit 3784abd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Drivers/Mysqli/MysqliDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3784abd

Please sign in to comment.