NeverStopLearning4Life Posted November 27, 2020 Report Posted November 27, 2020 CRUD with MySQLI and PHP Chapter 1 - Lesson 1 - 11/27/2020 After following along with Ben and coding the example and opening it in chrome ... I get the following warning ... Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in C:\MAMP\htdocs\connect-db-live.php on line 12Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in C:\MAMP\htdocs\connect-db-live.php on line 12 Here is a screenshot from VSCode ... I looked for a solution online and found a page on Stack Overflow describing a solution but I couldn't figure out how to incorporate their solution into my code. Any assistance would be greatly appreciated. Here is the screenshot from StackOverflow ... Michael mastertouch53@gmail.com / mastertouch88@yahoo.com Quote
administrator Posted December 2, 2020 Report Posted December 2, 2020 Hi, Hmm ... the above from Stack, is telling you to create a user account with the noted permissions. So try creating a new user in MySQL with the above commands. Makes sense? Quote
Riyan17 Posted September 9 Report Posted September 9 The error server requested authentication method unknown to the client typically occurs due to a mismatch in authentication protocols between the MySQL server and the client. This can be resolved by updating the MySQL user authentication plugin to a compatible version. Use the SQL command 'ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';` to set the native password plugin for authentication. Quote
administrator Posted September 9 Report Posted September 9 6 hours ago, Riyan17 said: between the MySQL server and the client. This can be resolved by updating the MySQL user authentication plugin to a compatible version. Did you resolve this? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.