权限
ALL:除grant option所有的权限的集合。一般是给管理员的
单个的权限:一般给业务用户
管理员用户:<br>grant all on *.* to root#'localhost';
业务用户:<br>mysql> create user app@'localhost' identified with mysql_native_password by '123';<br>msyql> grant insert,update,delete,select on *.* to app@'localhost';<br>mysql> show grants for app@'localhost';--查看用户权限信息
主从用户:<br>create user repl@'10.0.0.%' identified with msyql_native_password by '123';<br>grant replication slave on *.* to repl@'10.0.0.%';