프로젝트 관련 조사/DB
[MySQL] Ubuntu MySQL 원격 접속 허용
호레
2015. 11. 9. 15:12
반응형
출처:https://opentutorials.org/module/1175/7779
a. MySQL Folder로 이동
cd /etc/mysql
b. my.cnf 파일을 출력
sudo nano my.cnf
port = 3306
bind-address = 127.0.0.1
127.0.0.1은 현재 Lock이 걸린 상태기 때문에,
root 계정 이외의 접속자는 제한된다.
원격접속을 허용 해야함으로, # 을 넣어 Lock을 풀어준다.
# bind-address = 127.0.0.1
저장 !
c. MySQL Restart
sudo /etc/init.d/mysql restart
d. Run MySQL
mysql -uroot -p
e. Ubuntu MySQL 원격접속 허용 명령 실행 1
grant all privileges on *.* to 'root'@'Windows IP Address or %' identified by 'Password';
( 접속이 원만하지 않을 경우는 %를 사용 모두 접근 가능하게 만들어 주면 된다. )
f. 권한 갱신
flush privileges;
반응형