티스토리 뷰
1. 모든 IP 설정
insert into mysql.user (host,user,password,ssl_cipher,x509_issuer,x509_subject) values('%','[user id]',password('[user password]'),'','','');
grant all privileges on *.* to '[user id]'@'%';
flush privileges;
2. IP 지정
insert into mysql.user (host,user,password,ssl_cipher,x509_issuer,x509_subject) VALUES ('123.123.%','[user id]',password('[user password]'),'','','');
grant all privileges on *.* to '[user id]'@'123.123.%';
flush privileges;
- %는 모든 IP를 나타내나 localhost가 포함되어 있지는 않음
3. 읽기전용 계정
create user [user id];
set password for [user id] = password('[user password]');
grant select on *.* to [user id];
또는
insert into mysql.user (host,user,password,select_priv,ssl_cipher,x509_issuer,x509_subject) values ('%','[user id]',password('[user password]'),'Y','','','');
insert into mysql.user (host,user,password,select_priv,ssl_cipher,x509_issuer,x509_subject) values ('localhost','[user id]',password('[user password]'),'Y','','','');
select host, user, password from mysql.user;
flush privileges;
'Database > MySQL' 카테고리의 다른 글
[MySQL] open_files_limit를 설정해도 적용안되는 문제 (0) | 2016.12.20 |
---|---|
[MySQL] 테이블 생성 및 계정 할당 (0) | 2016.12.19 |
[MySQL] password 변경 (0) | 2016.12.19 |
[MySQL] mysql consol 연결 (0) | 2016.12.19 |
[MySQL] error 2006 - MySQL server has gone away (0) | 2016.10.11 |
- Total
- Today
- Yesterday
- yum
- 물리디스크
- CMAKE_OSX_SYSROOT
- pfctl
- CLion
- physicaldisk
- vgcreate
- lvremove
- linux
- lvm 늘리기
- aix compile
- 파티션 추가
- 센트6
- update
- _status
- aix ld
- install
- pf.anchors
- Repository
- postgresql11
- firewall-cmd service
- Ignoring CMAKE_OSX_SYSROOT value
- ld 옵션
- mirrorlist
- fielddata
- noipath
- centos7
- CentOS
- virtualbox
- _stats
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |