---
title: "MySQL修改密码"
author: "cs_man"
date: "2009-12-05T16:59:53Z"
tags: ["MySQL", "SQL"]
categories: ["数据库"]
slug: "mysql"
draft: false
lastmod: "2009-12-10T13:15:03Z"
id: 542287
url: "https://cs-man.iteye.com/blog/542287"
---

mysql&gt; 状态下输入 update user set password=password('新密码') where user='root';

回显  
Query OK, 0 rows affected (0.00 sec)  
Rows matched: 2 Changed: 0 Warnings: 0

 

mysql&gt; 状态下输入 FLUSH PRIVILEGES;  
回显  
Query OK, 0 rows affected (0.00 sec)  
mysql&gt; 状态下输入 quit ;  
退出 sql

F41F8E254D92D4B1FC332C03FBB02299