版权声明:本文为博主原创文章,大家可以转载分享学习 https://blog.csdn.net/qq_31469369/article/details/78604653
mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
mysql -uroot -p
Enter password: <输入新设的密码newpassword>