Preface When we forget the MySQL database password, we cannot enter the database normally, and we cannot change the password. So how do we change the password at this time? Here we will teach you a simple and commonly used way to change the password. Here’s how: 1. Open the command line as an administrator; 2. Stop the mysql service: 3. Enter the following command to start MySQL without a password. Many versions found on Baidu modify the my.ini file, but this has no effect in version 8; mysqld --console --skip-grant-tables --shared-memory 4. Open another DOS window and enter mysql -u root to log in without a password; 5. After logging in, enter the following commands in sequence: use mysql; #View username and password select user, host, authentication from user; #Change password command Note: When changing the password, I encountered a situation where root@localhost could not be recognized. I think this is related to the fact that I entered the password correctly but could not log in. It has not been verified yet! Summarize This is the end of this article about the quick solution to the problem of forgetting the MySQL8 password. For more relevant content about the solution to forgetting the MySQL8 password, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: About Docker security Docker-TLS encrypted communication issues
>>: HTML table tag tutorial (25): vertical alignment attribute VALIGN
Table of contents One master and multiple slaves ...
Table of contents 1. Introduction to import_table...
Step 1: Add Ubuntu source Switch to root su root ...
A colleague once told me to use a temporary table...
Notice! ! ! select * from user where uid not in (...
Table of contents 1. Environment Configuration 1....
Copy code The code is as follows: <body <fo...
1. Function Mainly used to preserve component sta...
Introduction to HTML page source code layout This...
Recently, when I was working on a conference heal...
1. What is it? MySQL is the most popular relation...
Table of contents 1. Integrate Ant Design Vue 2. ...
Problem description: I used a desktop computer an...
Preface The Linux system is controlled by the sys...
Today a junior student asked a question. The HTML...