当前位置:网站首页> mysql8.0忘记密码的详细解决方法
mysql8.0忘记密码的详细解决方法
2022-06-22 19:06:00 【1024问】
一.问题:
二:解决
1.关闭mysql服务
2.使用cd指令切换到mysql的bin目录
3.打开一个新的cmd窗口,
4.使用名为mysql的数据库,将对应user表的密码置空
5. 关闭以步骤2mysqld --console --skip-grant-tables --shared-memory打开的mysql服务(直接关掉窗口即可)
6. 重新开启mysql服务,实现无密码登陆了
7.修改密码
总结
一.问题:太久没用mysql ,忘记了原先的root密码



使用mysqld --console --skip-grant-tables --shared-memory如下图.


mysql -u root -p发现可直接Enter键不输入密码进入mysql操作界面,如下图

如下图



注意root和localhost的引号需为英文字符
ALTER USER 'root'@'localhost'IDENTIFIED WITH mysql_native_password BY 'XXX';//XXX为新密码flush privileges
重新进入mysql就需要输入刚刚前面设置的新密码了。

到此这篇关于mysql8.0忘记密码的详细解决方法的文章就介绍到这了,更多相关mysql8.0 忘记密码解决内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!
边栏推荐
- NFT 中可能存在的安全漏洞
- [deeply understand tcapulusdb knowledge base] common problems in deploying tcapulusdb local
- Shell编程基础(第七篇:分支语句-if)
- client-go gin的简单整合十一-Delete
- 510000 prize pool invites you to join the war! The second Alibaba cloud ECS cloudbuild developer competition is coming
- Cloud computing in the metauniverse to enhance your digital experience
- Oh, my God, it's a counter attack by eight part essay
- 三维天地助力实验室夯实完整质量体系管理
- 一个支持IPFS的电子邮件——SKIFF
- DynamicDatabaseSource,在应用端支持数据库的主从
猜你喜欢

一张图解码 OpenCloudOS 社区开放日

软件压力测试有哪些方法,如何选择软件压力测试机构?
![[in depth understanding of tcaplus DB technology] getting started tcaplus SQL driver](/img/2b/3ab5e247ac103728b4d3579c3c5468.png)
[in depth understanding of tcaplus DB technology] getting started tcaplus SQL driver

Security policy and NAT (easy IP) of firewall Foundation

如何低成本快速搭建企业知识库?

ROS从入门到精通(八) 常用传感器与消息数据
![[in depth understanding of tcapulusdb technology] introduction tcapulusdb problem summary](/img/2b/3ab5e247ac103728b4d3579c3c5468.png)
[in depth understanding of tcapulusdb technology] introduction tcapulusdb problem summary

Zabbix学习笔记(三十七)

What can the accelerated implementation of digital economy bring to SMEs?

MySQL基础——函数
随机推荐
[deeply understand tcapulusdb technology] how to start tcapulusdb process
一张图解码 OpenCloudOS 社区开放日
运用span-method巧妙实现多层table数据的行合并
[resolved] -go_ out: protoc-gen-go: Plugin failed with status code 1.
Introduction of neural network (BP) in Intelligent Computing
[in depth understanding of tcapulusdb technology] tcapulusdb adds a new business cluster cluster
3个月自学自动化测试,薪资从4.5K到15K,鬼知道我经历了什么?
What can the accelerated implementation of digital economy bring to SMEs?
[deeply understand tcapulusdb technology] create a game area for document acceptance
跨域 CORS/OPTIONS
Merge sort (recursive and iterative Implementation)
【Proteus仿真】NE555延时电路
Fibonacci search (golden section)
[in depth understanding of tcapulusdb technology] business guide for creating doc acceptance
Web technology sharing | [Gaode map] to realize customized track playback
MySQL基础——函数
It supports running in kubernetes, adds multiple connectors, and seatunnel version 2.1.2 is officially released!
MySQL高级(二)
How should programmers look up dates
采用QTest进行数据集测试-性能测试-GUI测试