当前位置:网站首页>本地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
边栏推荐
- unit testing
- Canoe - description of common database attributes
- 1. Circular nesting and understanding of lists
- Open the neural network "black box"! Unveil the mystery of machine learning system with natural language
- Discussion | has large AI become autonomous? Lecun, chief scientist of openai
- /*Write a loop to output the elements of the list container in reverse order*/
- Strings and characters
- Learning XML DOM -- a typical model for parsing XML documents
- [Galaxy Kirin V10] [server] KVM create Bridge
- Dictionaries and collections
猜你喜欢

Article publishing experiment

Network connection (II) three handshakes, four waves, socket essence, packaging of network packets, TCP header, IP header, ACK confirmation, sliding window, results of network packets, working mode of

Canoe - the third simulation project - bus simulation - 3-1 project implementation

20 minutes to learn what XML is_ XML learning notes_ What is an XML file_ Basic grammatical rules_ How to parse

Two way process republication + routing policy

Function introduction of canbedded component

Canoe - the third simulation project - bus simulation - 2 function introduction, network topology

DNS hijacking
![[Galaxy Kirin V10] [server] FTP introduction and common scenario construction](/img/ef/f0f722aaabdc2d98723cad63d520e0.jpg)
[Galaxy Kirin V10] [server] FTP introduction and common scenario construction

Basic data types of MySQL
随机推荐
2022 ape circle recruitment project (software development)
Safety testing aspects
Snake (C language)
Canoe - the second simulation engineering - xvehicle - 2panel design (principle, idea)
Summary of automated testing framework
Add t more space to your computer (no need to add hard disk)
JMeter common configuration components and parameterization
/*The rewriter outputs the contents of the IA array. It is required that the type defined by typedef cannot be used in the outer loop*/
Elevator dispatching (pairing project) ①
Recursion and divide and conquer strategy
[test theory] test the dimension of professional ability
[advantages and disadvantages of outsourcing software development in 2022]
DML statement of MySQL Foundation
[Galaxy Kirin V10] [server] FTP introduction and common scenario construction
Recursive method to achieve full permutation (C language)
[Galaxy Kirin V10] [server] set time synchronization of intranet server
Discussion | has large AI become autonomous? Lecun, chief scientist of openai
Dynamic memory management
Huge number multiplication (C language)
[Galaxy Kirin V10] [server] system startup failed