mysql创建用户并授权语句_MySQL创建用户与授权

查看当前用户

SELECT CURRENT_USER();

mysql创建用户并授权语句_MySQL创建用户与授权_第1张图片

CREATE USER 语法

CREATE USER [IF NOT EXISTS]

user [auth_option] [, user [auth_option]] ...DEFAULT ROLE role [, role]...[REQUIRE {NONE | tls_option [[AND]tls_option] ...}][WITH resource_option [resource_option]...][password_option | lock_option]...user:

(see Section6.2.4, “Specifying Account Names”)

auth_option: {

IDENTIFIEDBY 'auth_string'

| IDENTIFIED WITHauth_plugin| IDENTIFIED WITH auth_plugin BY 'auth_string'

| IDENTIFIED WITH auth_plugin AS 'hash_string'}

tls_option: {

SSL|X509| CIPHER 'cipher'

| ISSUER 'issuer'

| SUBJECT 'subject'}

resource_option: {

MAX_QUERIES_PER_HOURcount<

你可能感兴趣的:(mysql创建用户并授权语句)