解决mysql手动修改root密码连接不了的问题。

来源:互联网 发布:淘宝手淘首页怎么上 编辑:程序博客网 时间:2024/03/28 17:56

mysql版本:5.1,连接mysql的信息是1130,因为用phpmyadmin手动修改了password没有加md5加密,所以无法连接mysql

windows:

1.停止mysql服务,wamp或xamp启动的停止mysql进程

2.到WINDOWS的命令行了(‘DOS’ 下),切换到你的MySQL bin目录下。

3.mysqld  --defaults-file="C:\Program
Files\MySQL\MySQL Server 5.1\my.ini" --console --skip-grant-tables

注意你的my.ini位置。
4.另开一个dos窗口输入 mysql -u root mysql 
UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;

FLUSH PRIVILEGES; 
quit

mysqladmin shutdown

5.完成

 

原帖地址:http://bbs.csdn.net/topics/310006640

0 0