DEV Community

Cover image for PHP Laravel authentication method unknown to the client [caching_sha2_password]
zeeshan mehdi
zeeshan mehdi

Posted on

PHP Laravel authentication method unknown to the client [caching_sha2_password]

I am using laravel 5.8 and having MAMP server got this error resolved by adding DB_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock in .env file like below

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=8889
DB_DATABASE=dbname
DB_USERNAME=root
DB_PASSWORD=root
DB_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock

Top comments (0)