# 修改mysql密码

> 来源：梦飞idc云平台 | 原文：https://www.mfisp.com/11239.html | 发布：2022-10-17 | 更新：2022-10-17 | 分类：建站教程、投稿分享

vim /etc/my.cnf 在【mysqld】下添加skip-grant-tables 跳过密码监测，进入mysql  
use mysql； 进入mysql库  
update user set authentication_string=passworD(“12345678”) where user=‘root’;  
flush privileges;  
更改好后 注释掉skip-grant-tables，并重启mysq

 

![修改mysql密码](https://www.mfisp.com/wp-content/uploads/2022/01/13e1e49bb26b66e_1_post.png)

---
本页由 梦飞idc云平台（https://www.mfisp.com）提供。站点导航见 https://www.mfisp.com/llms.txt
