메뉴 건너뛰기

Korea Oracle User Group

DBMS

MySQL MySQL 설치 후 외부 접속 허용하기

명품관 2016.09.09 16:57 조회 수 : 2842

MySQL 설치 후 외부 접속 허용하기

 

MySQL을 설치하면 기본적으로 로컬에서만 접속이 가능하고 외부에서는 접속이 불가능하다.

외부에서 접속하면 아래와 같은 에러메시지를 받게 된다.

 

Host '111.111.111.111' is not allowed to connect to this MySQL server

 

아래와 같이 외부 접속에 대한 권한을 부여해야 한다.

 

[root@testora ~]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 5.7.15 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '패스워드' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.02 sec)

mysql> GRANT TRIGGER ON *.* TO 'root'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT SUPER ON *.* TO 'root'@'%';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> 

 

번호 제목 글쓴이 날짜 조회 수
19 티베로 에러 내용 확인 방법 명품관 2016.08.26 10739
18 DP, DPL, DPI에 관한trace log 내용 분석 명품관 2016.09.06 1036
17 티베로 trace log 중 ERROR_PSM_COMPILE_FAILED 에러란 명품관 2016.09.06 11429
16 CentOS 6.7 에서 MySQL 5.7 설치 명품관 2016.09.09 13789
» MySQL 설치 후 외부 접속 허용하기 명품관 2016.09.09 2842
14 How to Install MariaDB 10 on RHEL 8 [2] 명품관 2019.01.31 252
13 MySQL Admin - 01 명품관 2019.10.08 702
12 MySQL 8.0 Reference Manual - Tutorial - Connecting to and Disconnecting from the Server 명품관 2020.02.27 191
11 MySQL 8.0 Reference Manual - Tutorial - Entering Queries 명품관 2020.02.28 199
10 MySQL 8.0 Reference Manual - Tutorial - Creating and Using a Database1 명품관 2020.02.28 188
9 MySQL 8.0 Reference Manual - Tutorial - Creating and Using a Database2 명품관 2020.02.29 233
8 Windows 버전 MySQL의 my.ini 파일 찾기 file 명품관 2020.03.01 13293
7 MySQL 8.0 Reference Manual - Tutorial - Creating and Using a Database3 명품관 2020.03.02 416
6 MySQL 8.0 Reference Manual - Tutorial - Creating and Using a Database4 명품관 2020.03.03 252
5 MySQL 8.0 Reference Manual - MySQL Server Administration1 - Configuring the Server 명품관 2020.03.05 9596
4 MySQL 8.0 Reference Manual - MySQL Server Administration2 - Server Configuration Validation 명품관 2020.04.17 417
3 기동시 "Job for mysqld.service failed because the control process exited with error code." 에러로 기동 실패 명품관 2020.09.03 7919
2 Top-Rated PostgreSQL GUI Clients for Windows 명품관 2023.05.10 91
1 PostgreSQL 16 설치하기(Installation) [1] 명품관 2024.01.24 407
위로