修改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