当前位置:网站首页>本地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/149139.html原文链接:https://javaforall.cn
边栏推荐
- PHP programming language (1) - operators
- Introduction to canoe automatic test system
- Crawl Zhejiang industry and trade news page
- Application and Optimization Practice of redis in vivo push platform
- Canoe: what is vtsystem
- On binary tree (C language)
- C language structure to realize simple address book
- Advanced order of function
- [Galaxy Kirin V10] [desktop] login system flash back
- Evolution from monomer architecture to microservice architecture
猜你喜欢
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
Performance test method
Appscan installation error: unable to install from Net runtime security policy logout appscan solution
Canoe - the third simulation project - bus simulation-1 overview
Add t more space to your computer (no need to add hard disk)
[Galaxy Kirin V10] [desktop] can't be started or the screen is black
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 second simulation project -xvihicle1 bus database design (operation)
From programmers to large-scale distributed architects, where are you (I)
Canoe - the second simulation engineering - xvehicle - 2panel design (principle, idea)
随机推荐
MPLS: multi protocol label switching
Performance features focus & JMeter & LoadRunner advantages and disadvantages
Using SA token to solve websocket handshake authentication
Huge number multiplication (C language)
Four characteristics and isolation levels of database transactions
When I forget how to write SQL, I
Common system modules and file operations
Canoe - the third simulation project - bus simulation-1 overview
Canoe - the third simulation project - bus simulation - 2 function introduction, network topology
Canoe - the second simulation engineering - xvehicle - 2 panel design (operation)
Knapsack problem and 0-1 knapsack problem
Application and Optimization Practice of redis in vivo push platform
VI text editor and user rights management, group management and time management
Canoe - description of common database attributes
Basic data types of MySQL
Postman interface test
Software testing related resources
If you don't know these four caching modes, dare you say you understand caching?
OSPF comprehensive experiment
JMeter common configuration components and parameterization