修改mysql.user方式修改密码 mysql> update mysql.user set authentication_string=password('123qwe') where user='svoid' and Host = 'localhost'; Query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)
MySQL5.7修改mysql数据库的user表的时候,不能再用 update user set password=password("123456") where user="root";