본문 바로가기

DataBase/MariaDB

MariaDB : 계정생성/삭제/권한

반응형
# Change Database (mysql)
USE mysql;

# Select User
SELECT Host, User, Passsword FROM user;

# Create
CREATE USER '계정'@'localhost' IDENTIFIED BY '비밀번호';
CREATE USER '계정'@'%' IDENTIFIED BY '비밀번호';

# Drop
DROP USER '계정'@'호스트';

# Grant
GRANT ALL PRIVILEGES ON 데이터베이스.* TO '계정'@'%';

# Refresh
FLUSH PRIVILEGES;

 

반응형