I haven't used Mysql very often. Today, I have a small program that I need to use, but I forgot how to change the user password. Search the Internet and record it.
1 update user set authentication_string = password('root'), password_expired = 'N', password_last_changed = now() where user = 'root';
It takes effect after restarting the MySQL service.
Original link: https://www.cnblogs.com/activiti/p/7810166.html