最新下载
热门教程
- 1
 - 2
 - 3
 - 4
 - 5
 - 6
 - 7
 - 8
 - 9
 - 10
 
mysql命令模式修改mysql root密码笔记
时间:2022-11-14 23:37:04 编辑:袖梨 来源:一聚教程网
修改mysql密码过程如下
百度搜索一文章看到使用
格式:mysqladmin -u用户名 -p旧密码 password 新密码
修改于时我下看操作
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.5.27-log MySQL Community Server (GPL)
Copyright (c) 2000, 2011, 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 '\h' for help. Type '\c' to clear the current input statement.
mysql> mysqladmin -u root password 我要设置的密码
    ->
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'mysql
admin -u root password 我要设置的密码' at line 1
mysql> mysqladmin -u root -password 我要设置的密码
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'mysql
admin -u root -password 我要设置的密码' at line 1
最后小编使用了 mysqladmin -u root -password 我要设置的密码 无法搞定,突然想到直接更新表即可。
mysql> update mysql.user set password=PASSWORD('我要设置的密码') where User ='root
';
Query OK, 3 rows affected (0.05 sec)
Rows matched: 3  Changed: 3  Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql>
好了这样就搞定了哦,虽然过程不复杂也不简单。
相关文章
- 新三国志曹操传奇门八卦怎么打 奇门八卦三星打法 11-04
 - 烟雨江湖松桦秘闻支线任务怎么做 松桦秘闻支线任务流程攻略 11-04
 - 二重螺旋金色魔灵怎么获得 金色魔灵获取攻略 11-04
 - 二重螺旋装备图纸怎么获得 装备图纸获取攻略 11-04
 - 2025年庆祝六一儿童节句子六一儿童节朋友圈文案(精选97句) 11-04
 - 二重螺旋输出角色怎么选 输出角色选择推荐 11-04