停止mysql服务
用这个命令启动mysql服务:mysqld --skip-grant-tables &
启动mysql
登陆进去(不用密码可以登陆进去的)
update mysql.user set `password`=password('新密码') where `user`='用户名' and host ='登陆机器';
flush privileges;
停止mysql服务
用这个命令启动mysql服务:mysqld --skip-grant-tables &
启动mysql
登陆进去(不用密码可以登陆进去的)
update mysql.user set `password`=password('新密码') where `user`='用户名' and host ='登陆机器';
flush privileges;