There was no problem connecting to the database yesterday, but today this error was reported when connecting to the database. I searched a lot of methods on the Internet and found one method that solved my problem. My environment is Linux Steps: First, you need to skip password authentication. Find the /etc/my.cnf file in the Linux environment, find mysqld in the file, and add the skip-grant-tables statement under mysqld to avoid password verification. Then restart mysql, /etc/init.d/mysqld restart, and change the password. as follows, mysql> use mysql; mysql> update user set password=password("your new password") where user="root"; mysql> flush privileges; mysql> quit Then restart MySQL, use the same statement as above, the problem is solved. If you want to modify the username at the same time, you can use the following statement: mysql> use mysql; mysql> update user set password=password("your new password"), user="(user name to be modified)" where user="root"; mysql> flush privileges; mysql> quit Summarize The above is all the content of this article about MySQL error solutions. I hope it will be helpful to everyone. Interested friends can continue to refer to this site: Brief analysis of the MySQL character set causing database recovery errors, analysis of MySQL table sorting rules different error problems, etc. If you have any questions, you can leave a message at any time, and the editor will reply to you in time. You may also be interested in:
|
<<: jQuery plugin to implement floating menu
>>: Explanation of several ways to run Tomcat under Linux
Table of contents DragEvent Interface DataTransfe...
Table of contents introduce Installation and Usag...
DOCTYPE Doctype is used to tell the browser which...
Everyone knows that images on web pages are genera...
This article is mainly to let beginners understan...
1. Install nginx in docker: It is very simple to ...
1. Before configuring the IP address, first use i...
Preface Let's get straight to the point. The ...
Click here to return to the 123WORDPRESS.COM HTML ...
Table of contents 1. What to debug 2. Features of...
1. Check the software installation path: There is...
Table of contents TypeScript environment construc...
1. Virtual Machine Side 1. Find the mysql configu...
Slideshows are often seen on web pages. They have...
Table of contents 1. ChildNodes attribute travers...