Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

php mysqli_connect: authentication method unknown to the client [caching_sha2_password]

I solve this by SQL command:

ALTER USER 'mysqlUsername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysqlUsernamePassword';

which is referenced by https://dev.mysql.com/doc/refman/8.0/en/alter-user.html

if you are creating new user

 CREATE USER 'jeffrey'@'localhost' IDENTIFIED WITH mysql_native_password BY 'passwor
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #authentication #method #unknown #client
ADD COMMENT
Topic
Name
7+3 =