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
This article uses an example to describe the MySQ...
Preface We need to retrieve certain data that mee...
Simple example of adding and removing HTML nodes ...
Table of contents 2. Tried methods 2.1 keep-alive...
Table of contents 1. What is Bubble Sort 2. Give ...
123WORDPRESS.COM--HTML超文本标记语言速查手册<!-- --> !D...
How to debug a page on iPad? When using iOS 5, you...
this keyword Which object calls the function, and...
The “Cancel” button is not part of the necessary ...
This article example shares the specific code of ...
Preface: Timestamp fields are often used in MySQL...
There are two types of Linux system time. (1) Cal...
Use vue to simply implement a click flip effect f...
1. Accessing literals and local variables is the ...
This article shares the specific code of jquery+A...