在MySQL 5.7 password字段已從mysql.user表中刪除,新的字段名是“authenticalion_string”.
更新root的密碼
格式:
update user set authentication_string=password('新密碼') where user='root' and Host='localhost';
例:
選擇數據庫
use mysql;
修改密碼
update user set authentication_string=password('123.com') where user='testuser' and Host='%';
刷新權限
flush privileges;