How to forget the root password in Mysql8.0.13 under Windows 10 system

How to forget the root password in Mysql8.0.13 under Windows 10 system

1. First stop the mysql service

As an administrator, open CMD and close it or close the Windows service page

C:\Users\xxx>net stop mysql

Open the CMD page as an administrator and enter the following command to start MySQL without a password

C:\Users\xxx>mysqld --console --skip-grant-tables --shared-memory

See the following page and open a new CMD page

Enter the following in the new CMD page

mysql> flush privileges; -- Modify privileges Query OK, 0 rows affected (0.16 sec)

mysql> ALTER USER "root"@"localhost" IDENTIFIED BY "123456"; -- Change password Query OK, 0 rows affected (0.08 sec)

After completing the above operation, the password is changed. You can log in with the new password after exiting.

Reference: MySQL error: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement solution

Next, I will explain to you the solution to the MySQL error: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement. Interested students can refer to it.

Error description:

mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

Solution:

Refresh the permissions table first.

mysql> flush privileges;

Query OK, 0 rows affected (0.01 sec)

mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';

Query OK, 0 rows affected (0.00 sec)

Reference as follows

https://www.jb51.net/article/203587.htm

This is the end of this article about how to operate Mysql8.0.13 when you forget the root password under Windows 10 system. For more related content about Windows 10 Mysql8.0.13 when you forget the root password, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • MySQL - 4 ways to change the root password (taking Windows as an example)
  • What should I do if I forget my MySQL password? How to reset MySQL root password
  • Solution to forgetting the root password of mysql under windows
  • How to view or modify the root password of MySQL if it is forgotten (with pictures and text)
  • Multiple methods to modify MySQL root password (recommended)
  • How to forget the root password in MySQL 5.7 and change the root password in MySQL 5.7
  • The perfect solution for forgetting the root password of Mysql
  • How to view the root password for MySQL connection
  • Detailed explanation of the idea of ​​installing mysql8.0.11 and changing the root password and connecting navicat for mysql
  • 4 ways to modify MySQL root password (summary)

<<:  Detailed example of remotely connecting to Docker using TLS encrypted communication

>>:  HTML table tag tutorial (24): horizontal alignment attribute of the row ALIGN

Recommend

Nginx compiled nginx - add new module

1. View existing modules /usr/local/nginx/sbin/ng...

Vue realizes cascading selection of provinces, cities and districts

Recently, I need to implement a cascading selecti...

Nginx forwarding based on URL parameters

Use scenarios: The jump path needs to be dynamica...

Summary of situations where MySQL indexes will not be used

Types of Indexes in MySQL Generally, they can be ...

Implementation of nginx flow control and access control

nginx traffic control Rate-limiting is a very use...

Mysql uses insert to insert multiple records to add data in batches

If you want to insert 5 records into table1, the ...

Use of Linux telnet command

1. Introduction The telnet command is used to log...

Simple steps to create a MySQL container with Docker

Preface We have already installed Docker and have...

How to reduce memory usage and CPU usage of web pages

Some web pages may not look large but may be very...

A Deeper Look at SQL Injection

1. What is SQL injection? Sql injection is an att...

A Brief Analysis of MySQL Connections and Collections

Join query A join query refers to a matching quer...

Detailed explanation of Vue3 sandbox mechanism

Table of contents Preface Browser compiled versio...

MySQL integrity constraints definition and example tutorial

Table of contents Integrity constraints Definitio...