又忘记密码啦?教你几种更改密码的方式

作者:IT科技类资讯 来源:应用开发 浏览: 【】 发布时间:2025-11-05 02:37:59 评论数:
又忘记密码啦?教你几种更改密码的方式
复制# skip-grant-tables 模式下修改root密码  [root@host ~]# mysql  Welcome to the MySQL monitor.  Commands endwith ; or \g.  Your MySQL connection id is 16  Server version: 5.7.23-log MySQL Community Server (GPL)  Copyright (c) 2000,又忘 2018, Oracle and/or its affiliates. All rights reserved.  Oracle is a registered trademark of Oracle Corporation and/or its  affiliates. Other names may be trademarks of their respective  owners.  Type help;or\hfor help. Type \cto clear the current input statement.  mysql> update mysql.userset authentication_string = password (xxxxxx) whereuser = rootand host = localhost;  Query OK, 0 rows affected, 1 warning (0.00 sec)  Rows matched: 1  Changed: 0  Warnings: 1  mysql> flush privileges;  Query OK, 0 rows affected (0.01 sec)  1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.