The problem is as follows: I entered the command mysql -uroot -p, but I forgot the password. Step 1: Stop the mysql service There are methods on the Internet to open /etc/my.cnf and modify it, but I didn't find the file in this directory at all. Maybe it’s due to the version! Enter the command to stop the mysql service: /etc/init.d/mysql stop Step 2: Start mysql safely and skip the authorization table: mysqld_safe --user=mysql --skip-grant-tables --skip-networking & Step 3: Reset MySQL password Input: mysql -uroot -p. You don’t need to enter a password at this time. Just press Enter to enter. Enter the statement: use mysql, that is, select a database, enter the statement to reset the password, and I found the following problem, which means that the password column is not included So the authentication_string column should be modified Then enter the command: flush privileges to refresh the MySQL system privilege related tables. quit Exit mysql Step 4: Restart the service and enter the newly set password to log in Restart the mysql service: /etc/init.d/mysql restart Enter the password and enter mysql. For more information, please see the topic: MySQL password operation summary The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: js to achieve simple calendar effect
>>: Implementation of Nginx domain name forwarding
Let's take a look at the detailed method of b...
I don't know if you have used the frameset at...
Table of contents Linux--File descriptor, file po...
Table of contents Overview 1. Function debounce 2...
Preface In the process of continuous code deliver...
First configure the project artifacts Configuring...
Redux is a data state management plug-in. When us...
Table of contents 1. Demand 2. Database Design 3....
Starting from IE 8, IE added a compatibility mode,...
Table of contents 1. Two setState, how many times...
Preface This article mainly introduces how to sta...
Preface Recently, a Java EE web project that has ...
This article shares the specific code for JavaScr...
Record the installation and configuration method ...
This article shares the specific code of the WeCh...