슬기로운 에러 생활
[ Server ] ubuntu 3306 port 열기
vhrehfdl
2019. 9. 8. 11:23
1. mysql 폴더로 이동한다.
cd /etc/mysql/
2. mysql.conf에서 mysql.cnf를 들어간다.
vi mysql.conf.d
3. bind-address = 127.0.0.1 부분을 주석처리한다.
# bind-address = 127.0.0.1
4. mysql 들어가서 설정을 바꿔준다.
grant all privileges on *.* to 'root'@'%' identified by '비밀번호'; flush privileges;
5. mysql restart를 한다.
sudo /etc/init.d/mysql restart
6. 테스트 해본다.
mysql -h "IP주소" -P 3306 -u root -p
cf. 이래도 안되면은 방화벽을 검사해봐야 한다.