通过phpmyadmin修改MySQL密码 - 丹丹和谐的日志! -

来源:百度文库 编辑:神马文学网 时间:2024/04/30 06:40:06
通过phpmyadmin修改MySQL密码:一、通过浏览器登入phpmyadmin控制台,点击“权限”,如图:二、勾选root用户,并单击后面的“编辑权限”,如图:三、在打开的页面的中间位置,找到“更改密码”一栏,输入两次新密码,并单击“执行”按钮;四、回到Windows命令行模式(切换到MySQL的安装目录)下,执行如下命令:
D:\Program Files\MySQL\bin>mysql -u root mysql -p123456789 \\*旧密码,因为在phpmyadmin里修改的新密码还没有正式生效,-p和旧密码中间没有空格符*\\
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1042 to server version: 4.1.10-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> update user set password=password('新密码') where user='root'; \\*为root帐户更新新密码*\\
Query OK, 1 row affected (0.00 sec)
Rows matched: 2 Changed: 1 Warnings: 0mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)mysql> \q
Bye[注:蓝色文字为手工输入的部分,红色文字为回显的部分。]
五、重启MySQL服务即可!
本文来源于丹丹和谐的日志! http://www.siutung.org  原文链接:http://www.siutung.org/post/116/