试试 mysql>update mysql.user set password=OLD_PASSWORD('newpassword') where host='yourhost' and user='youruser'; mysql>flush privileges;
在mysql自己的控制台里面用
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql>update mysql.user set password=OLD_PASSWORD('123456') where host='localhos' at line 1sugarshop(糖果店) 说的这个方法好像不行啊,我运行这段代码,报错了。rardge(Rardge) 我没搜索到类似文章阿......要是可以的话,请你帮个忙回答以下该怎么操作把。万分感谢哦
mysql>update mysql.user set password=OLD_PASSWORD('newpassword') where host='yourhost' and user='youruser';
mysql>flush privileges;