I'm using php 7.2.2 and mysql 8.0.
When I try to connect with the right credential I get this error:
PDOException::("PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]")
Need help to troubleshoot the problem.
alter user 'username'@'localhost' identified with mysql_native_password by 'password';
As suggested by ailionx
here : https://github.com/laradock/laradock/issues/1390
Found this somewhere, don't remember where (or I would credit), but it works for me until MySQL 8 gets better.
In MySQL shell (command prompt, whatever):
CREATE USER username@localhost identified with mysql_native_password by 'password';
Where username is the username and password is the password for that user.
Then you can add permissions in the shell - or in the Workbench as the user now exists with Authentication Type: Standard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With