The following two methods all adopt online
Method 1: mysql> Set the password for root @ localhost=password (' 123 ');
Method 2: mysql> The use of mysql;
Mysql> Update the user set the password=password (' 123 ') where the user='root' and the host='localhost'
I all of the above mentioned methods error, see below:
Excuse me: how to modify the database MySQL 5.7 ROOT password?