当前位置:网站首页>Linux changes the MySQL password after forgetting it
Linux changes the MySQL password after forgetting it
2022-06-11 12:03:00 【java-zh】
1、 close mysql service
service mysqld stop
2、 find my.cnf The configuration file
whereis my.cnf![]()
3、 stay [mysqld] Add under label :skip-grant-tables
vim /etc/my.cnf
4、 start-up mysql service
service mysqld start
5、 Login without password mysql, Enter directly after executing the following command
mysql -u root
6、 Use... In the database mysql library
use mysql;
7、 perform sql Update the password
update user set password=password(‘ Your new password ’) where user=‘root’; 
8、 Refresh
flush privileges;9、 Exit after modification
exit![]()
9、 stop it mysql service
service mysqld stop10、 Get rid of my.cnf Inside skip-grant-tables Content
vim /etc/my.cnf11、 start-up mysql service
service mysqld start12、 Log in
mysql -u root -p
边栏推荐
- 合并两个有序数组(C语言)
- How to understand CPU load
- When the security engineer finds a major vulnerability in the PS host, the CD can execute arbitrary code in the system
- 2019年书单
- The no category parents plug-in helps you remove the category prefix from the category link
- Software project management 7.1 Basic concept of project schedule
- 2020-07 学习笔记整理
- Guice integrated properties configuration
- C# 设置或验证 PDF中的文本域格式
- Count the top k strings with the most occurrences
猜你喜欢

Elk - hearthbeat implements service monitoring

Solve the problem of swagger document interface 404

Deep learning and CV tutorial (14) | image segmentation (FCN, segnet, u-net, pspnet, deeplab, refinenet)

Template engine - thymeleaf

JS interview questions - arrow function, find and filter some and every

web开发选型,web开发毕业谁

Zero after factorial (C language)

How to solve the problem that high-precision positioning technologies such as ultra wideband UWB, Bluetooth AOA and RTK cannot be widely used due to their high cost? Adopt the idea of integrated deplo

iframe 传值

Let you understand selection sorting (C language)
随机推荐
Uncaught TypeError: Cannot set property ‘next‘ of undefined 报错解决
阶乘后的零(C语言)
The tutor transferred me 800 yuan and asked me to simulate a circuit (power supply design)
web开发选型,web开发毕业谁
typescript 编译选项和配置文件
反射真的很耗时吗,反射 10 万次,耗时多久。
Use of RadioButton in QT
ObjectInputStream读取文件对象ObjectOutputStream写入文件对象
Add auto thumbnail function for WordPress related log plug-ins
iframe 传值
2022 | framework for Android interview -- Analysis of the core principles of binder, handler, WMS and AMS!
Network protocol of yyds dry goods inventory: datagram socket for detailed explanation of socket protocol
Solve the problem of swagger document interface 404
01_ Description object_ Class diagram
When the security engineer finds a major vulnerability in the PS host, the CD can execute arbitrary code in the system
Fast build elk7.3
[第二章 基因和染色体的关系]生物知识概括–高一生物
Typescript compilation options and configuration files
Addition of large numbers (C language)
JS 加法乘法错误解决 number-precision