create user 'jgshin'@'localhost' identified by 'Admin123!'; (localhost : 로컬 접속만 가능)
create user 'jgshin'@'10.22.1.13' identified by 'Admin123!'; -------- 1
GRANT ALL PRIVILEGES ON *.* TO 'jgshin'@'localhost';
grant all privileges on *.* to 'jgshin'@'%';
GRANT ALL PRIVILEGES ON *.* TO 'jgshin'@'10.22.1.13' IDENTIFIED BY 'Admin123!'; -------- 2
drop user 'jgshin'@'10.22.1.13';
alter user 'jgshin'@'%' identified with mysql_native_password by 'Admin123!';
show grants for jgshin; -------- 3
ddd
grant usage on *.* to 'jgshin'@'%' identified by 'Admin123!';
grant all privileges on *.* to 'jgshin'@'localhost' with grant option;
grant all privileges on *.* to 'jgshin'@'localhost' with grant option;
grant process on *.* to 'jgshin'@'%';
flush privileges; -------- 4
Db별 권한확인
>Select * from [mysql].db;
모든 user 보기 , mysql DB의 user table
use mysql;
select user from user;
SELECT Host,User,plugin,authentication_string FROM mysql.user; ------- 5
## 유저 ACL 리스닝 권한 열기
GRANT ALL PRIVILEGES ON *.* TO 'jgshin1'@'112.175.119.%' IDENTIFIED BY '1123';
GRANT ALL PRIVILEGES ON *.* TO 'jgshin2'@'112.175.119.%' IDENTIFIED BY '2123';
mysql> flush privileges;
## ACL 확인
SELECT Host,User,plugin,authentication_string FROM mysql.user;
'IT > 기타' 카테고리의 다른 글
node.js 로컬 설치 (0) | 2025.02.23 |
---|---|
리눅스 nvdia 설치 작업 메모. (0) | 2025.02.19 |
Oracle OS파라미터 작업 설정 (0) | 2025.02.19 |
mysql db 백업&복원 방법 (스크립트 포함) (0) | 2025.02.18 |
ELK APM 톰캣 카탈리나 환경 변수 (config 포함) (0) | 2025.02.18 |