估计你在设置完成后,没有重新打开一个cmd吧。
解决方案 »
- mysql存储过程中的游标取部出值
- 如何快速找出不同记录,注意效率,注意效率.谢谢
- 使用MySQL创建一个新表出错
- mysql 创建 库,表,不可以用中文名字和数字
- 用SQL Serv写,三条语句,救命用的?????? 帮帮忙吧
- mysql 为什么不支持top 5 呢?!
- 紧急!请问mysql问题,有一两个数据库中有两个结构相同的表,请问怎么样,查询出一个记录集
- MySQL中有没有把字符串转换成数值的函数?
- 这个是什么错误呢,设置外键时显示ERROR 1022: Can't write; duplicate key in table '#sql-434_2'
- 关于mysql启动失败的问题
- 求助mysql decode函数的使用问题
- mysql备份的方法通常有那些呢
mysql>FLUSH PRIVILEGES ; 关闭 重启 用新密码进入就可
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。C:\Users\root>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.10 MySQL Community Server (GPL)Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trade of Oracle Corporation and/or its
affiliates. Other names may be trades of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> use mysql
Database changed
mysql> set password password('fzg6160283');
ERROR 1193 (HY000): Unknown system variable 'password'
mysql> set password for root=password('fzg6160283');
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables opt
ion so it cannot execute this statement
mysql> update user set password=PASSWORD('fzg6160283') where user='root';
Query OK, 3 rows affected (0.09 sec)
Rows matched: 3 Changed: 3 Warnings: 0mysql> flush privileges;
Query OK, 0 rows affected (0.11 sec)mysql> exit
ByeC:\Users\root>mysql -u root -p
Enter password: **********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.10 MySQL Community Server (GPL)Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trade of Oracle Corporation and/or its
affiliates. Other names may be trades of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> exit
ByeC:\Users\root>mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N
O)C:\Users\root>mysql -u root -p
Enter password: **********
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y
ES)C:\Users\root>
你的方法没有问题
应该刷新权限
我现在遇到这个问题,恼火得很,不管用什么方法修改root密码,当时有效,重启mysql服务过后又没有密码了,root可直接进入