当前位置:网站首页>三分钟学会如何找回mysql密码
三分钟学会如何找回mysql密码
2022-06-23 15:54:00 【用户7353950】
一、在测试工作中我们肯定会写一些sq查询语句方便我们验证数据是否正确,从而判断当前软件是否存在缺陷,但是查询的过程中肯定需要我们先连接数据库,如果数据库密码忘记我们就无法完成工作,这里就教会大家如何快速修改密码,和重置数据库密码,这样在工作中很大提高我们工作的效率
二、首先我们需要先学会如何修改mysql数据密码,这里就使用navicat来连接数据库这也是工作最常用的软件
• 先打开navicat 如下图先找到自己密码存放的位置,存放在自己厂库中的mysql文件目录下中找到表查到最好一个user这就是用来存放数据库密码的,对应的是用户名和密码
• 然后再点击查询按钮新建一个查询的方式,对应我们修改mysql密码就是写一个sql语句具体如下
update user set password=password('123') where user='root';
flush privileges; 修改需要刷新权限才能生效
• 这样就是成功修改了mysql的密码然后在本地服务的地方重启mysql服务,直接关闭navicat再次打开的时候连接数据库就会连接失败说明数据库连接失败,只需要在重新编辑输入修改之后的密码即可如图
三、上述就是如何修改密码,如果有一天忘记密码的时候也不用卸载数据库重装,下面演示如何重置数据密码
• 先找到数据库安装的位置找到一个my.int的文件(C:Program Files (x86)MySQLMySQL Server 5.1)如下图的地址位置
• 用记事本打开文件之后找到 [mysqld]这行在下面添加一段代码如下 这样就可以不用密码登录数据库 skip-grant-tables 然后保存之后再重新刷新一下mysql服务这样在连接的时候就不需要密码也能成功。
• 登录成功之后就可以按照上述修改密码的操作重新设置新的密码
• update user set password=password('123') where user='root';
flush privileges; 修改需要刷新权限才能生效
这样password 就是新的密码只需要记住之后以后忘记密码也不用太担心卸载软件重装了。
边栏推荐
- [tcapulusdb knowledge base] Introduction to tmonitor stand-alone installation guidelines (II)
- Leetcode: interview question 08.13 Stacking bin [top-down DFS + memory or bottom-up sorting + DP]
- [tcapulusdb knowledge base] Introduction to new models of tcapulusdb
- Leetcode: question d'entrevue 08.13. Empiler la boîte [DFS en haut + mémoire ou tri en bas + DP]
- JSON in MySQL_ Extract function description
- ADB 按鍵名、按鍵代碼數字、按鍵說明對照錶
- Now I want to buy stocks. How do I open an account? Is it safe to open a mobile account?
- 科大讯飞神经影像疾病预测方案!
- Golang对JSON文件的写操作
- OutputDebugString instructions and exception handling
猜你喜欢

CoAtNet: Marrying Convolution and Attention for All Data Sizes翻译

TensorRT Paser加载onnx 推理使用

Matlab: how to know from some data which data are added to get a known number
![[tcapulusdb knowledge base] Introduction to new models of tcapulusdb](/img/2a/1d7f12c99b92d143e142ade8bc90f9.png)
[tcapulusdb knowledge base] Introduction to new models of tcapulusdb

万字攻略,详解腾讯面试(T1-T9)核心技术点,面试题整理

安全舒适,全新一代奇骏用心诠释老父亲的爱

Innovation strength is recognized again! Tencent security MSS was the pioneer of cloud native security guard in 2022

Focus: zk-snark Technology

get_ edges

IFLYTEK neuroimaging disease prediction program!
随机推荐
What are the risks of opening a fund account? Is it safe to open an account
OutputDebugString instructions and exception handling
[openharmony] USB gadget configuration HDC function cfg file interpretation
Can the hbuilderx light theme be annotated?
Readimg: read picture to variable variable variable
R语言ggplot2可视化水平箱图(Horizontal boxplot with coord_flip)、并添加抖动数据点显示分布情况(jittered points)
Server deployment and instructions
ABP框架之——数据访问基础架构(下)
NLP 论文领读|改善意图识别的语义表示:有监督预训练中的各向同性正则化方法
R语言使用colorblinr包模拟色盲视觉、将已有的ggplot2可视化结果图像使用edit_colors函数编辑转化为色盲视觉友好的可视化结果、并自定设置色盲形式、色盲严重级别
读书郎通过上市聆讯:平板业务毛利率走低,2021年利润同比下滑11%
R language ggplot2 visualizes horizontal boxplot with coord_flip, and adds jittered data points to display the distribution
Golang data type diagram
15 differences between MES in process and discrete manufacturing enterprises (Part I)
泰山OFFICE技术讲座:使用字体斜体的四种情形
Apache commons tool class
提高效率 Or 增加成本,开发人员应如何理解结对编程?
Code example of golang date time package: get age, zodiac and constellation based on birthday
安全舒适,全新一代奇骏用心诠释老父亲的爱
线上交流丨可信机器学习之机器学习与知识推理相结合(青源Talk第20期 李博)