Home >Database >Mysql Tutorial >mysql 用户授权_MySQL

mysql 用户授权_MySQL

WBOY
WBOYOriginal
2016-06-01 13:10:451154browse

无意义,备忘

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;

3,grant all privileges on *.* to 'root'@'%' identified by 'xxxxx';

容许外部所有ip访问




Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn