1.修改密码
// 8以前
set password for 用户名@localhost = password('新密码');
//8以后
ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';
2.赋权操作
//8以前:
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
//8以后
create user root@'%' identified by '123456';
grant all privileges on *.* to root@'%' with grant option;