修改root用戶的的密碼
這里是關鍵點,由於mysql5.7沒有password字段,密碼存儲在authentication_string字段中,password()方法還能用
在mysql中執行下面語句修改密碼
show databases; use mysql; update user set authentication_string=PASSWORD("yourpassword") where user='root'; update user set plugin="mysql_native_password"; flush privileges; quit;
鏈接:https://www.jianshu.com/p/3821c2603b92