Mysql中对数据库进行用户管理
-- 创建用户,密码 可以在任意主机访问
CREATE user 'herma' @'%' IDENTIFIED by '123456'
-- 修改用户密码
ALTER user 'herma'@'%' IDENTIFIED with mysql_native_password by '1234';
SHOW GRANTS FOR'herma' @'%';
-- 将用户授予所有数据库权限
GRANT all on itcast.* to 'herma'@'%'
-- 撤销权限
REVOKE all on itcast.* from 'herma'@'%'