본문 바로가기
프로그래밍/MariaDB

Ubuntu 20.04에서 MariaDB 10.5 설치

by 왕초보 개발자 2021. 11. 23.
728x90

※ 개인적으로 기록하고 공부하는 용도로 올림

 

MariaDB 설치 순서

 

  1. MariaDB의 apt repository 추가 
  2. mariadb-server 설치
  3. mariadb-client 설치
  4. 보안 설정

1 & 2번

https://mariadb.org/download/?t=repo-config 링크에 들어가면 1, 2번은 해결 가능. 

 

Download MariaDB Server - MariaDB.org

REST API Release Schedule Reporting Bugs … Continue reading "Download MariaDB Server"

mariadb.org

 

 

사이트에 들어가서 OS와 설치하고픈 MariaDB버전을 선택하면 repository 추가하고 MariaDB server까지 설치하는 명령어를 알려준다.

 

sudo apt-get install software-properties-common dirmngr apt-transport-https
sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el,s390x] https://mirror.yongbok.net/mariadb/repo/10.5/ubuntu focal main'
sudo apt update
sudo apt install mariadb-server

그대로 입력하고 뭔가 물어보면 Y 입력해주면 잘 넘어간다.

3번

Client 설치는 아래 명령어만 실행해 주면 된다

sudo apt install mariadb-client

 

4번

아래 명령어 실행. 특이하게 명령어가 mysql이다...

sudo mysql_secure_installation

설치되면 Y/N형태의  질문이 여러 개가 나온다

  1. Switch to unix_socket authentication (unix_socket 인증으로 전환)
  2. Change the root password? (root 비번 변경 여부)  - 이거는 기존에 root 계정을 어떻게 세팅해 놨느냐에 따라 사람마다 다르게 뜨는 것 같다
  3. Remove anonymous users? (익명의 사용자 제거 여부)
  4. Disallow root login remotely? (원격 접속 비허용)
  5. Remove test database and access to it? (테스트 데이터베이스 제거여부)
  6. Reload privilege tables now? (권한 테이블 리로드 여부)

학습용이라면 애지간하면 Default로 설정하고 차후 필요할 때 설정 변경하면 될듯 하다.

 

이제 설치가 잘 되었는지 확인해 보자

sudo mariadb

이렇게 잘 접속이 되면 설치 완료

728x90