
Ubuntu 22.04에 MariaDB를 설치하는 방법
2022-10-18 last update
6 minutes reading Ubuntu 22.04 install mariadb MySQL database mariadbMariaDB는 MySQL 서버의 원래 개발자가 개발한 인기 있는 오픈 소스 관계 데이터베이스 시스템입니다. 이것은 원래 여러 개선 사항이 있는 MySQL 서버에서 분기되었습니다. 이 자습서에서는 Ubuntu 22.04 Linux 시스템에 MariaDB 서버를 설치하는 방법을 안내합니다.
Ubuntu에 MariaDB 서버 설치 설치가 완료되면
1. 리포지토리 구성
MariaDB 패키지는 기본 Ubuntu 리포지토리에서 사용할 수 있습니다. 또한 MariaDB는 Ubuntu 시스템에 최신 버전을 설치할 수 있는 공식 리포지토리를 제공합니다. MariaDB Apt 리포지토리를 구성하려면 sudo 권한 계정으로 터미널을 열고 다음 명령을 실행합니다.(vitag.Init = window.vitag.Init || []).push(function(){viAPItag.display("vi_1879779679")})위의 명령은/etc/apt/sources.list.d 디렉토리 아래에 저장소 파일을 생성합니다.sudo apt 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] https://atl.mirrors.knownhost.com/mariadb/repo/10.8/ubuntu jammy main'
2. 우분투에 MariaDB 설치하기
다음으로 다음 명령을 실행하여 Ubuntu 시스템에 MariaDB 서버와 클라이언트를 설치합니다.(vitag.Init = window.vitag.Init || []).push(function(){viAPItag.display("vi_1879779679") )})확인 메시지가 표시되면 'y'를 누르고 Enter 키를 누릅니다.sudo apt update
sudo apt install mariadb-server

mysql_secure_installation
스크립트를 실행하여 MariaDB 서버를 보호하고 루트 계정의 비밀번호를 설정합니다. sudo sudo mysql_secure_installation
화면의 지시에 따라 보안 마법사를 완료하십시오.(vitag.Init = window.vitag.Init || []).push(function(){viAPItag.display("vi_1879779679")}) 3. MariaDB 서비스 관리
MariaDB는 서비스를 관리하기 위해 시스템 구성 파일을 생성합니다. 다음 명령을 사용하여 MariaDB 서비스를 중지, 시작 또는 다시 시작합니다.MariaDB 서비스의 현재 상태를 보려면 다음을 입력하십시오.sudo systemctl start mariadb
sudo systemctl stop mariadb
sudo systemctl status mariadb
4. MariaDB에 연결
MariaDB 셸을 사용하여 사용자, 데이터베이스 및 기타 관련 활동을 생성할 수 있습니다. 셸을 연결하려면 다음을 입력합니다.mysql -u root -p
mysql_secure_installation
명령으로 설정한 MariaDB 루트 사용자 암호를 입력합니다. Output:Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 19 Server version: 10.8.3-MariaDB-2ubuntu1 Ubuntu 22.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>