> 오류 내용
Host ‘<ip address>’ is not allowed to connect to this MySQL server
> 확인 <user table> (※ 아래와 같을 경우 localhost외의 접근이 불가능하다.)
mysql> SELECT Host,User,authentication_string FROM mysql.user -> ; +-----------+------------------+-------------------------------------------+ | Host | User | authentication_string | +-----------+------------------+-------------------------------------------+ | localhost | root | *80A443D4CF25B57EE480BA2EBD77D84C3957F0BB | | localhost | mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | | localhost | mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | | localhost | debian-sys-maint | *3494532BAE0FF1A9EA7E724D617265518D876386 | | localhost | wordpressuser | *DC1D26CA63BEB884EF3C641A9B16FCAA9317713E | +-----------+------------------+-------------------------------------------+ 5 rows in set (0.00 sec)
> 수정 <user table에 허용 가능 host를 insert 한다>
- 모든 IP 허용
-
INSERT INTO mysql.user (host,user,authentication_string,ssl_cipher, x509_issuer, x509_subject) VALUES ('%','root',password('패스워드'),'','',''); GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'; FLUSH PRIVILEGES;
> BIND-ADRESS 변경
/etc/mysql/my.cnf (or) /etc/mysql/mysql.conf.d/mysqld.cnf
아래 line을 주석처리 하거나 (0.0.0.0) 으로 변경
-
bind-address = 127.0.0.1
> MYSQL 재시작
-
root# service mysql restart
덕분에 잘 해결되었습니다. 감사합니다.