MySQL5.7 修改密码

mysql:
create user ecuser@'%' identified by 'Qq@123456';
grant all privileges on *.* to ecuser@'%';
flush privileges;
alter user 'root'@'localhost' identified by 'Qq@123456' ;
mysql5.7 修改密码 
mysql> update user set password=password("123456") where user="root";
ERROR 1054 (42S22): Unknown column 'password' in 'field list'
mysql> update user set authentication_string=password("123456") where user="root";
Query OK, 1 row affected, 1 warning (0.17 sec)
Rows matched: 1  Changed: 1  Warnings: 1
mysql -u root -p
show databases;
use test;
show tables;

你可能感兴趣的:(MySQL5.7 修改密码)