当前位置:网站首页>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
边栏推荐
猜你喜欢

01_ Description object_ Class diagram

. The way to prove the effect of throwing exceptions on performance in. Net core

Notes on topic brushing (XIV) -- binary tree: sequence traversal and DFS, BFS

Uncaught typeerror: cannot set property 'next' of undefined

CVPR 2022 | 文本引导的实体级别图像操作ManiTrans

刷题笔记(十三)--二叉树:前中后序遍历(复习)

Elk - elastalert largest pit

Is the SSL certificate reliable in ensuring the information security of the website?

01_ Description object_ Class diagram

中文输入法输入事件composition的使用
随机推荐
[C language] anonymous/unnamed struct & Union
Addition of large numbers (C language)
Memory mapping image of the grayloc module in the surfacefinder process
Use compiler option '--downleveliteration' to allow iteration of iterations
刷题笔记(十三)--二叉树:前中后序遍历(复习)
Is the SSL certificate reliable in ensuring the information security of the website?
Use of RadioButton in QT
golang利用异或^交换两个变量以及加解密
InputStream读取文件OutputStream创建文件
Elk - x-pack set user password
中国网络安全年会周鸿祎发言:360安全大脑构筑数据安全体系
arguments. Callee implement function recursive call
ObjectInputStream读取文件对象ObjectOutputStream写入文件对象
What is a Gerber file? Introduction to PCB Gerber file
WordPress database cache plug-in: DB cache Reloaded
Uncaught typeerror: cannot set property 'next' of undefined
log4j-slf4j-impl cannot be present with log4j-to-slf4j
2020-07 学习笔记整理
带你了解直接插入排序(C语言)
Notes on topic brushing (XIV) -- binary tree: sequence traversal and DFS, BFS