简单用法:
grant all on *.* to root@192.168.3.72 identified by ‘abc123’;
原语法:
代码语言:javascript复制GRANT priv_type [(column_list)] [, priv_type [(column_list)]] ...
ON [object_type] {
tbl_name | * | *.* | db_name.*}
TO user [IDENTIFIED BY [PASSWORD] 'password']
[, user [IDENTIFIED BY [PASSWORD] 'password']] ...
[REQUIRE
NONE |
[{SSL| X509}]
[CIPHER 'cipher' [AND]]
[ISSUER 'issuer' [AND]]
[SUBJECT 'subject']]
[WITH with_option [with_option] ...]
object_type =
TABLE
| FUNCTION
| PROCEDURE
with_option =
GRANT OPTION
| MAX_QUERIES_PER_HOUR count
| MAX_UPDATES_PER_HOUR count
| MAX_CONNECTIONS_PER_HOUR count
| MAX_USER_CONNECTIONS count
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/100605.html原文链接: