自己总结记录,后续方便使用
查询用户
select User,Host,authentication_string from mysql.user;
授权
grant select privileges on aaa.bbb to "abc"@"%" identified by "123456"; #创建一个只有对aaa库下的bbb表查询权限、可以在任何ip登陆的abc用户
grant all privileges on *.* to "user"@"%" identified by "123456"; #同理,创建所有权限(除grant)的用户
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
更新user为root,host为% 的密码为123456
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
更新user为root,host为localhost 的密码为123456
flush privileges;
未完待续······