cake 2006-4-21 15:11
为什么我无法修改mysql的帐户密码啊
请看:
C:\mysql\bin>mysqladmin -uroot -password 1983
C:\MYSQL\BIN\MYSQLA~1.EXE: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'
可是我以前从来没有改过密码,仍然保持着默认的username:"root",passowrd:""
这是怎么回事?
lucky 2006-4-21 15:12
C:\mysql\bin>mysqladmin -uroot -password 1983 好象是错的吧。
mysqladmin [OPTIONS] command command....
-u, --user=# User for login if not current user
-p, --password[=...] Password to use when connecting to server
happy 2006-4-21 15:14
设置root密码:
C:\MYSQL\BIN>mysql -u root mysql
mysql>Update user Set password=password('new_pass') where user='root';
mysql>Flush Privileges;
或
C:\MYSQL\BIN>mysql -u root mysql
mysql>Set password for root=password('new_pass');
或
C:\MYSQL\BIN>mysqladmin -u root password new_pass