[MySQL] 원격접속 허용
[전체 허용]
GRANT ALL PRIVILEGES ON *.* TO '아이디'@'%' IDENTIFIED BY '패스워드';
FLUSH PRIVILEGES;
[IP 대역대 허용]
GRANT ALL PRIVILEGES ON *.* TO '아이디'@'111.222.%' IDENTIFIED BY '패스워드';
[1개 IP 허용]
GRANT ALL PRIVILEGES ON *.* TO '아이디'@'111.222.33.44' IDENTIFIED BY '패스워드';
root@zetawiki:~# netstat -ntlp | grep mysqld
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 7931/mysqld
root@zetawiki:~# vi /etc/mysql/my.cnf
#bind-address = 127.0.0.1
[mysqld]
bind-address = 0.0.0.0
root@zetawiki:~# service mysql restart
mysql stop/waiting
mysql start/running, process 8190
root@zetawiki:~# netstat -ntlp | grep mysqld
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 8190/mysqld
댓글
댓글 쓰기