当前位置:网站首页>本地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
边栏推荐
- Day7 list and dictionary jobs
- [machine] [server] Taishan 200
- Seven examples to understand the storage rules of shaped data on each bit
- Aike AI frontier promotion (2.14)
- From programmers to large-scale distributed architects, where are you (I)
- VLAN part of switching technology
- Network connection (III) functions and similarities and differences of hubs, switches and routers, routing tables and tables in switches, why do you need address translation and packet filtering?
- Send a request using paste raw text
- The most ideal automated testing model, how to achieve layering of automated testing
- Virtual machine configuration network
猜你喜欢
F12 clear the cookies of the corresponding web address
Elevator dispatching (pairing project) ④
Jemeter script recording
Static comprehensive experiment ---hcip1
Application and Optimization Practice of redis in vivo push platform
The bamboo shadow sweeps the steps, the dust does not move, and the moon passes through the marsh without trace -- in-depth understanding of the pointer
Discussion | has large AI become autonomous? Lecun, chief scientist of openai
TS type gymnastics: illustrating a complex advanced type
Canoe - the third simulation project - bus simulation - 3-1 project implementation
Knapsack problem and 0-1 knapsack problem
随机推荐
1. Circular nesting and understanding of lists
Pod management
[Galaxy Kirin V10] [desktop] FTP common scene setup
software test
Unittest+airtest+beatiulreport combine the three to make a beautiful test report
Recursion and divide and conquer strategy
Canoe test: two ways to create CAPL test module
Canoe - the second simulation project -xvihicle1 bus database design (operation)
Appscan installation steps
Fundamentals of database operation
[Galaxy Kirin V10] [server] grub default password
Software testing related resources
Write a program to judge whether the elements contained in a vector < int> container are 9.20: exactly the same as those in a list < int> container.
/*Rewrite the program, find the value of the element, and return the iterator 9.13: pointing to the found element. Make sure that the program works correctly when the element you are looking for does
F12 clear the cookies of the corresponding web address
Basic data types of MySQL
BGP ---- border gateway routing protocol ----- basic experiment
C language structure to realize simple address book
Snake (C language)
TS type gymnastics: illustrating a complex advanced type