sudo apt-get update

sudo apt-get upgrade

 

sudo apt-get mariadb-server       삭제명령어  sudo apt-get purge mariadb-*

sudo mysql_secure_installation

 

마리아 db 버전 확인

use mysql;

select version();

 

database 생성

사용자 생성

사용자 권한 부여

//외부에서 접근 가능하도록 설정

grant all privileges on *.* to 'ID'@'%' identified by 'password';

flush privileges; //권한 적용

 

외부에서 접근이 안되는 경우 체크해 볼 사항

1,방화벽

- 외부 방화벽에서 외부 아이피 및 3306 포트 개발

- 자체 방화벽(ufw)확인

. 설정상태 체크 : ufw status

. 3306mysql 포트 개방 : ufw allow 3306

 

2.MySql 설정파일 /etc/mysql/my.cnf/에서 "bind-address"항목 비활성화 주석처리

# Instead of skip-networking the default is now to listen only on

# localhost which is more compatible and is not less secure.

# bind-address  = 127.0.0.1
외부 접근을 위해서는 #을 넣어서 외부에서도 접근할 수 있게 한다.

 

출처 : https://niceit.tistory.com/  

 

낭만온달 - 위버멘쉬를 꿈꾸며...

 

https://13akstjq.github.io/aws/2019/05/29/how-to-deploy-spring-lagacy-project-ec2-aws.html

'Server > Linux' 카테고리의 다른 글

버추얼 머신 에러(AMD-V is disabled in the BIOS)  (0) 2020.12.29
파일 탐색을 위한 명령어(ubuntu)  (0) 2019.08.04

+ Recent posts