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]
-
mister_v
- Posts: 203
- Joined: Thu Mar 04, 2010 9:19 pm
-
chris
- Site Admin
- Posts: 216
- Joined: Mon Jul 21, 2008 9:52 am
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';