mysql创库授权

创建库
create database zabbix character set utf8 collate utf8_bin;
创建用户
create user 'slave'@'IP' identified by 'passwd';
直接授权及建用户
grant all privileges on busgps.* to 'busgps'@'%' identified by 'passwd' with grant option;
grant all privileges on exam.* to 'exam'@'%' identified by 'passwd' with grant option;
grant all privileges on entrycity.* to 'entrycity'@'%' identified by 'passwd' with grant option;
flush privileges;

show grants for 'busgps'@'%';

指定地址段
create user 'test'@'192.168.15.%' identified by 'passwd';
posted @ 2020-03-30 22:14  kylingx  阅读(151)  评论(0编辑  收藏  举报