当前位置:网站首页>本地Mysql忘记密码的修改方法(windows)
本地Mysql忘记密码的修改方法(windows)
2022-07-04 10:55:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
你是否有忘记密码的尴尬 你是否有连Mysql的安装路径都忘了的尴尬 别问我是怎么知道的,哈哈哈 话不多说,步入正题吧!
如果你记得mysql的安装路径的话,直接跳过步骤1 2 3
1.键盘Windows + R,输入services.msc然后回车;
2.找到Mysql,右键Mysql找到属性,打开就能看到可执行文件的路径了;
PS:可以切换到大写,然后一直按M M M…(祖传妙方)
3.进入bin目录下,按住shift + 鼠标右键,点击打开“在此处打开Powershell窗口”
4.关闭服务,在命令窗口输入
4.1 net stop mysql
4.2 mysqld –console –skip-grant-tables –shared-memory
窗口先不要关闭
5.像步骤3一样再打开一个命令窗口
5.1 mysql -u root -p 回车,这时让你输入密码,不输入,直接回车
5.2 use mysql
5.3 update user set authentication_string=” where user=’root’;
5.4 quit
6.关闭窗口1、2,再像步骤3一样再打开一个命令窗口
6.1 net start mysql
6.2 mysql -u root -p 回车,不输入密码,回车
6.3 ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘root2020’;
7.修改密码完成,新的密码就为root2020。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/149140.html原文链接:https://javaforall.cn
边栏推荐
- BGP advanced experiment
- Terms related to hacker technology
- Quick sort (C language)
- Postman interface test
- Crawl Zhejiang industry and trade news page
- How to quickly parse XML documents through C (in fact, other languages also have corresponding interfaces or libraries to call)
- Locust installation
- I What is security testing
- [testing theory] thinking about testing profession
- Open the neural network "black box"! Unveil the mystery of machine learning system with natural language
猜你喜欢
![[Galaxy Kirin V10] [server] soft RAID configuration](/img/d5/789387613fafc18f623d0cff45093b.jpg)
[Galaxy Kirin V10] [server] soft RAID configuration

Send a request using paste raw text

On binary tree (C language)

From programmers to large-scale distributed architects, where are you (I)
![[Galaxy Kirin V10] [desktop] cannot add printer](/img/a6/28e4aa31e805a018e6db2b32ca1be0.jpg)
[Galaxy Kirin V10] [desktop] cannot add printer

Article publishing experiment

C language - stack

MPLS: multi protocol label switching

VLAN part of switching technology

Static comprehensive experiment ---hcip1
随机推荐
BGP ---- border gateway routing protocol ----- basic experiment
Discussion | has large AI become autonomous? Lecun, chief scientist of openai
Performance test process
PHP programming language (1) - operators
Get the data of the top 100 headlines today with Tianxing data
/*Write a function to open the file for input, read the contents of the file into the vector container of string class 8.9: type, and store each line as an element of the container object*/
Canoe the second simulation engineering xvehicle 3 CAPL programming (operation)
Knapsack problem and 0-1 knapsack problem
OSPF comprehensive experiment
Remove linked list elements
Strings and characters
How to quickly parse XML documents through C (in fact, other languages also have corresponding interfaces or libraries to call)
Virtual machine configuration network
shell awk
Article publishing experiment
[Galaxy Kirin V10] [desktop] login system flash back
What is an excellent architect in my heart?
Aike AI frontier promotion (2.14)
Canoe: the difference between environment variables and system variables
How to use diff and patch to update the source code