Fatal error: Uncaught PDOException: PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]

If you happen to update your MySQL it might happen that afterwards you get the following error message:

Fatal error: Uncaught PDOException: PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]

One (of a couple) possible solution could be to start your mysql server with the option „default-authentication-plugin“ and the „mysql_native_password“ value:

mysql.server start --default-authentication-plugin=mysql_native_password

It might also be necessary to alter your password as following:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password';

(But don’t forget to flush your privileges with FLUSH PRIVILEGES tho)

November 24th, 2018