|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
如下操作:
# mysql -u root mysql
mysql> update user set password= ('****') where user='root';
Query OK, 2 rows affected (0.05 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.11 sec)
mysql>\q
退出后重新出现错误如下:
]# mysql -u root mysql
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
怀疑需要输入密码,输入后还是错误:
# mysql -u root -p mysql
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
可是我如下操作:
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20 to server version: 4.1.7
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
密码为空进入了,可不能改密码了。我哪里错了吗? |
|