足球游戏_中国足彩网¥体育资讯$

mysql命令模式修改mysql root密码笔记
来源:易贤网 阅读:1153 次 日期:2014-09-29 10:48:20
温馨提示:易贤网小编为您整理了“mysql命令模式修改mysql root密码笔记”,方便广大网友查阅!

修改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>

好了这样就搞定了哦,虽然过程不复杂也不简单。

中国足彩网信息请查看IT技术专栏

中国足彩网信息请查看数据库
易贤网手机网站地址:mysql命令模式修改mysql root密码笔记
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 足球游戏_中国足彩网¥体育资讯$ 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标