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
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?
Riyan17 Posted September 9, 2024 Report Posted September 9, 2024 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.
administrator Posted September 9, 2024 Report Posted September 9, 2024 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?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now