본문 바로가기

시스템/DB

mysql 접근 ip 추가


Mysql> select host,user,password from mysql.user;

 

Mysql> grant all privileges on *.* to 'root'@'1.1.1.1' identified by 'root-password';

Mysql> grant all privileges on *.* to 'root'@'1.1.%' identified by 'root-password';

Mysql> grant all privileges on *.* to 'root'@'%' identified by 'root-password';

Mysql> flush privileges;


만약 my.cnf 에 bind-address 가 설정되어 있다면 해당 부분 제거


특정db와 table로 권한을 주고자 할때는 *.* 에 db.table 로 변경

'시스템 > DB' 카테고리의 다른 글

mysql 테이블 복사(dump), 복원  (0) 2017.04.20
H2 DB 기본 설정  (0) 2017.02.28
MySQL Slow Log  (0) 2017.02.13
mysql 클러스터 구성  (0) 2017.02.05