MariaDB 사용자 생성
Syntax
CREATE [OR REPLACE] USER [IF NOT EXISTS]
user_specification [,user_specification ...]
[REQUIRE {NONE | tls_option [[AND] tls_option ...] }]
[WITH resource_option [resource_option ...] ]
[password_option | lock_option]
user_specification:
username [authentication_option]
authentication_option:
IDENTIFIED BY 'password'
| IDENTIFIED BY PASSWORD 'password_hash'
| IDENTIFIED {VIA|WITH} authentication_rule [OR authentication_rule ...]
authentication_rule:
authentication_plugin
| authentication_plugin {USING|AS} 'authentication_string'
| authentication_plugin {USING|AS} PASSWORD('password')
tls_option:
SSL
| X509
| CIPHER 'cipher'
| ISSUER 'issuer'
| SUBJECT 'subject'
resource_option:
MAX_QUERIES_PER_HOUR count
| MAX_UPDATES_PER_HOUR count
| MAX_CONNECTIONS_PER_HOUR count
| MAX_USER_CONNECTIONS count
| MAX_STATEMENT_TIME time
password_option:
PASSWORD EXPIRE
| PASSWORD EXPIRE DEFAULT
| PASSWORD EXPIRE NEVER
| PASSWORD EXPIRE INTERVAL N DAY
lock_option:
ACCOUNT LOCK
| ACCOUNT UNLOCK
}
- 사용자 생성
create user 'test'@'localhost;
create user 'test'@'%';
- 비밀번호 설정
create user 'test'@'localhost' identofied by 'test';
- 사용자 삭제
drop user 'test'@'localhost';
'Development Study > DB' 카테고리의 다른 글
[MariaDB] .리눅스 Centos7 -MariaDB port 변경 (0) | 2020.08.27 |
---|---|
[MariaDB] . 리눅스 Centos7 - MariaDB 설치 (0) | 2020.08.27 |
[mariaDB] 설치 (0) | 2020.08.24 |