mysql命令模式修改mysqlroot密码笔记
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了mysql命令模式修改mysqlroot密码笔记,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1760字,纯文字阅读大概需要3分钟。
内容图文
![mysql命令模式修改mysqlroot密码笔记](/upload/InfoBanner/zyjiaocheng/558/8742b0fbe5744ae29a984cfeb0264bde.jpg)
修改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.2
修改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>
好了这样就搞定了哦,虽然过程不复杂也不简单。
,内容总结
以上是互联网集市为您收集整理的mysql命令模式修改mysqlroot密码笔记全部内容,希望文章能够帮你解决mysql命令模式修改mysqlroot密码笔记所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。