当前位置:网站首页>Solution of forgetting root password in mysql5.7 under Windows
Solution of forgetting root password in mysql5.7 under Windows
2022-07-24 06:32:00 【Step on the path of the pit】
Windows Next Mysql5.7 forget root Password solution
1、 First check mysql Whether the service starts , If it is started, stop the service first , It can be run in the start menu , Use command :
net stop mysql service name
Open Administrator cmd window , Switch to mysql Of bin Catalog , Run the command :
mysqld --defaults-file="MySQL The configuration file " --skip-grant-tables
notes :
--skip-grant-tables
The command passes the permission security check , Turn on mysql service , Connect like this mysql when , You don't have to enter a user password .
2、 Open another administrator cmd window , Connect mysql:
Enter the command :
mysql -uroot -p
appear :
Enter password:
Enter directly to log in , No password required .
Use the command to switch to mysql database :
use mysql;
Use the command to change root password :
5.7 Version of command
update mysql.user set authentication_string=password(' New password ') where user='root';
5.7 Previous versions used this command
update user set password=password(" New password ") where user="root';
Refresh the permissions :
flush privileges;
sign out
quit
restart MySQL service
Log back in :
mysql -uroot -p
Enter password prompt appears , Enter a new password to log in :
Enter password: ***********
边栏推荐
猜你喜欢

How to build a website full of ritual sense and publish it on the public website 1-2
![[222] memory overflow and location](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[222] memory overflow and location

leetcode剑指offer jz5 替换空格字符串

Do not rent servers, build your own personal business website (2)

Customize MVC 3.0

MySQL从基础到入门到高可用

FTP服务与实验
![Map the intranet to the public network [no public IP required]](/img/d0/b391bcfcaeb4c7ad439e241334361b.png)
Map the intranet to the public network [no public IP required]

PXE技术网络装机

DHCP原理与配置
随机推荐
Map the intranet to the public network [no public IP required]
Set up a WordPress personal blog locally and launch it through the intranet (22)
[222] memory overflow and location
Custom MVC 1.0
Leetcode sword finger offer JZ9 dual stack implementation queue
JSP tag 02
Jenkins automated unattended operation (up / down)
[219] what is the difference between app testing and web testing?
grep与正则的搭配使用
IP notes (9)
Work summary of a test Manager / Test Supervisor / test director
MeterSphere一站式开源持续测试平台
Flink time stream processing
Leetcode剑指offer JZ9 双栈实现队列
Sword finger offer jz10 Fibonacci sequence
Data set and pre training model
【217】#!/ The meaning of usr/bin/env
Leetcode refers to the duplicate number in the offer jz3 array
Flink function (2): checkpointedfunction
Leetcode sword finger offer jz25 merges two sorted linked lists