//solve method,input your password in 'YourRootPassword':
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword';
FLUSH PRIVILEGES;
//result shows in this fig:
转载于:https://www.cnblogs.com/begin256/p/10803401.html