Home > Database > Mysql Tutorial > body text

Here are some question-based titles for your article: **Direct and Clear:** * **MySQL 8.0.11 Connection Error: \'Cannot connect to MySQL server, authentication plugin: caching_sha2_password\&qu

Patricia Arquette
Release: 2024-10-26 08:38:02
Original
522 people have browsed it

Here are some question-based titles for your article:

**Direct and Clear:**

* **MySQL 8.0.11 Connection Error:

Troubleshooting MySQL 8.0.11 Connection Issue: "Cannot connect to MySQL server, authentication plugin: caching_sha2_password"

Problem:

Upon attempting to connect to MySQL server 8.0.11 using MySQL workbench, an error message arises: "Cannot connect to MySQL server, authentication plugin: caching_sha2_password: the specified module could not be found."

Solution:

To rectify this issue, follow these steps:

  1. Locate the my.ini configuration file and modify the [mysqld] section as follows:

    • Comment out the "default_authentication_plugin=caching_sha2_password" line with a # character.
    • Add a new line "default_authentication_plugin=mysql_native_password".
  2. Connect to your MySQL server using the root user from the command line:

    <code class="bash">mysql -u root -p</code>
    Copy after login
  3. Execute the following query:

    <code class="sql">ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxx';</code>
    Copy after login

    where "xxx" represents your current password.

  4. Restart the MySQL server.

Now, you should be able to connect to your MySQL server successfully without encountering the previously observed error.

The above is the detailed content of Here are some question-based titles for your article: **Direct and Clear:** * **MySQL 8.0.11 Connection Error: \'Cannot connect to MySQL server, authentication plugin: caching_sha2_password\&qu. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!