Home > Database > Mysql Tutorial > body text

Why is phpMyAdmin Failing to Connect to MySQL 8.0 Due to \'[caching_sha2_password]\' Authentication?

Linda Hamilton
Release: 2024-11-23 14:55:18
Original
266 people have browsed it

Why is phpMyAdmin Failing to Connect to MySQL 8.0 Due to

phpMyAdmin on MySQL 8.0

Issue:

Accessing MySQL 8.0 with phpMyAdmin results in errors related to an unknown authentication method during client connection, specifically "[caching_sha2_password]".

Solution:

To resolve this issue, it is necessary to modify the MySQL Authentication Plugin and password:

  1. Log in to the MySQL Console:
mysql -u root -pPASSWORD
Copy after login
  1. Change the Authentication Plugin:
ALTER USER root IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Copy after login
  1. Set the Password:

Replace 'PASSWORD' with the desired password.

Additional Notes:

  • Ensure the given password matches the one used when linking phpMyAdmin with the MySQL server.
  • If using docker images, the authentication plugin can be changed directly in the image configuration.
  • This solution provides a quick fix for development environments, but it is not recommended to change the MySQL Preferred Authentication Plugin.
  • Refer to the MySQL 8.0 Reference Manual for further information on the Preferred Authentication Plugin.

The above is the detailed content of Why is phpMyAdmin Failing to Connect to MySQL 8.0 Due to \'[caching_sha2_password]\' Authentication?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template