Hi,
I get the following error whe I tried to connect with php to MySQL server.
mysqli::__construct(): The server requested authentication method unknown to the client
How can I fix this?
I use standard login function:
$dbconn=new mysqli('127.0.0.1','user','passwd','database');
php mysqli_connect: authentication method unknown to the client [caching_sha2_password]
Re: php mysqli_connect: authentication method unknown to the client [caching_sha2_password]
MYSQL has changed it type of password (since Mysql 8 ?)
Anyway the easiest solution, is execute the following SQL command on MYSQL
It should solve your problem.
Anyway the easiest solution, is execute the following SQL command on MYSQL
Code: Select all
ALTER USER 'mysqlUsername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysqlUsernamePassword';