当前位置:网站首页>MySQL forgot password
MySQL forgot password
2022-07-31 04:52:00 【geejkse_seff】
mysql forgetting password is a common thing, so how to solve it?
1. First shut down the MySQL service, two methods:
(1) Open the command line cmd and enter the net stop mysql command to close the MySQL service.
(2) Find the service, find MYSQL56 (my computer is installed with mysql5.6, so here is MYSQL56) and then close
2. Open the MySQL installation path and enter the bin directory. There are two methods:
(1) Enter cmd in the directory to get the command line window, and the directory where it is located is also in the bin directory
(2) Or open the command line, enter cd F:mysqlin and press Enter
3. Remove the authentication check
mysqld --skip-grant-tables
In the cmd window of the previous step, enter mysqld --skip-grant-tables and press Enter
This command is to remove the authentication check.Prepare for the following operation, do not close!!!
4, enter the mysql container
Open a new command line, enter mysql and press Enter
mysql
5. Verify that the database login is successful
show databases;
The database indicates successful login.
6. Input Use mysql database.
use mysql;
The mysql database stores usernames and passwords.
7. View all tables
show tables;
The user table stores account information such as username, password, permissions, etc.
8. View account information
select user,host,password from user;
9. Change the root password, the password is 123456
update user set password=password('123456') where user='root' and host='localhost';
10. Check account information again
select user,host,password from user;
You can see that the password has been changed.
11. Verify the database in Navicat.
This will solve the problem of forgetting the database password~~~
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- MySQL模糊查询可以使用INSTR替代LIKE
- 论治理与创新 | 2022开放原子全球开源峰会OpenAnolis分论坛圆满召开
- 行业落地呈现新进展 | 2022开放原子全球开源峰会OpenAtom OpenHarmony分论坛圆满召开
- ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)解决办法
- 【云原生】DevOps(五):集成Harbor
- 益智类游戏关卡设计:逆推法--巧解益智类游戏关卡设计
- BUG消灭者!!实用调试技巧超全整理
- Interview | Cheng Li, CTO of Alibaba: Cloud + open source together form a credible foundation for the digital world
- MATLAB/Simulink&&STM32CubeMX工具链完成基于模型的设计开发(MBD)(三)
- The input input box displays the precision of two decimal places
猜你喜欢
Mysql应用安装后找不到my.ini文件
Minesweeper game (written in c language)
1. 获取数据-requests.get()
MySQL数据库安装配置保姆级教程(以8.0.29为例)有手就行
C language confession code?
ERROR 2003 (HY000) Can't connect to MySQL server on 'localhost3306' (10061)Solution
三道leetcode上的oj题
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
Unity手机游戏性能优化系列:针对CPU端的性能调优
Hand in hand to realize the picture preview plug-in (3)
随机推荐
Minesweeper game (written in c language)
STM32HAL library modifies Hal_Delay to us-level delay
BUG destroyer!!Practical debugging skills are super comprehensive
Minio上传文件ssl证书不受信任
【C语言】操作符详解
MATLAB/Simulink & & STM32CubeMX tool chain completes model-based design development (MBD) (three)
MySQL修改root账号密码
MySQL常见面试题汇总(建议收藏!!!)
Open Source Database Innovation in the Digital Economy Era | 2022 Open Atom Global Open Source Summit Database Sub-Forum Successfully Held
【py脚本】批量二值化处理图像
1. Get data - requests.get()
Three oj questions on leetcode
ENSP,划分VLAN、静态路由,三层交换机综合配置
centos7安装mysql5.7
剑指offer专项突击版第15天
ABC D - Distinct Trio(k元组的个数
The input input box displays the precision of two decimal places
A complete introduction to JSqlParse of Sql parsing and conversion
扫雷小游戏——C语言
【wpf】wpf中的那些模板之深度解析