Home >Database >Mysql Tutorial >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
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:
Locate the my.ini configuration file and modify the [mysqld] section as follows:
Connect to your MySQL server using the root user from the command line:
<code class="bash">mysql -u root -p</code>
Execute the following query:
<code class="sql">ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxx';</code>
where "xxx" represents your current password.
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!