日期:2014-05-16 浏览次数:20734 次
?
1.授权
?
--授权app用户从指定IP访问数据库的所有权限
grant all privileges on *.* to 'app'@'10.200.12.232' identified by 'app1234';
--取消授权
revoke alter on *.* from 'app'@'10.200.12.232' identified by 'app1234';
?
--授权app用户从指定IP访问downloaddb数据库的表(增删改查)
GRANT select,insert,update,delete ON downloaddb.* TO 'app'@'10.200.12.199' IDENTIFIED BY 'app1234' WITH GRANT OPTION;
--取消授权
revoke select,insert,update,delete ON downloaddb.* from 'app'@'10.200.12.199' IDENTIFIED BY 'app1234';
2.刷新权限
--刷新权限
FLUSH PRIVILEGES;