본문 바로가기

퍼블릭 클라우드

Amazon Linux 2023에 MySQL 클라이언트를 설치하는 방법

반응형

Amazon Linux 2023 인스턴스에 MySQL 클라이언트(MySQL 8)를 설치하는 방법

테스트 환경

  • 운영체제 정보
$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023.4.20240401"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/amazon-linux-2023/"
DOCUMENTATION_URL="https://docs.aws.amazon.com/linux/"
SUPPORT_URL="https://aws.amazon.com/premiumsupport/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
VENDOR_NAME="AWS"
VENDOR_URL="https://aws.amazon.com/"
SUPPORT_END="2028-03-15"
$ hostnamectl
 ...
  Virtualization: amazon
Operating System: Amazon Linux 2023.4.20240401
     CPE OS Name: cpe:2.3:o:amazon:amazon_linux:2023
          Kernel: Linux 6.1.82-99.168.amzn2023.x86_64
    Architecture: x86-64
 Hardware Vendor: Amazon EC2
  Hardware Model: t3a.medium
Firmware Version: 1.0

dnf 저장소에서 MySQL 관련 패키지 검색

dnf search mysql
$ dnf search mysql
Last metadata expiration check: 4:58:39 ago on Wed Apr 17 00:28:46 2024.
================================ Name & Summary Matched: mysql ================================
apr-util-mysql.x86_64 : APR utility library MySQL DBD driver
bind-dlz-mysql.x86_64 : BIND server mysql and mysqldyn DLZ modules
collectd-mysql.x86_64 : MySQL plugin for collectd
dovecot-mysql.x86_64 : MySQL back end for dovecot
mysql-selinux.noarch : SELinux policy modules for MySQL and MariaDB packages
perl-DBD-MySQL.x86_64 : A MySQL interface for Perl
perl-DateTime-Format-MySQL.noarch : Parse and format MySQL dates and times
php8.1-mysqlnd.x86_64 : A module for PHP 8.1 applications that use MySQL databases
php8.2-mysqlnd.x86_64 : A module for PHP 8.2 applications that use MySQL databases
postfix-mysql.x86_64 : Postfix MySQL map support
=================================== Summary Matched: mysql ===================================
mariadb105-devel.x86_64 : Files for development of MariaDB/MySQL applications
mariadb105-server-utils.x86_64 : Non-essential server utilities for MariaDB/MySQL applications
perl-DBD-MariaDB.x86_64 : MariaDB and MySQL driver for the Perl5 Database Interface (DBI)
728x90

패키지 저장소 추가

MySQL 8을 설치하기 위해 MySQL Yum 저장소를 추가

sudo wget https://dev.mysql.com/get/mysql80-community-release-el9-4.noarch.rpm
sudo dnf install -y mysql80-community-release-el9-4.noarch.rpm

현재 시스템에서 활성화된 저장소의 목록을 표시

sudo dnf repolist enabled

dnf repolist

MySQL 클라이언트 설치

MySQL 클라이언트를 설치합니다.

sudo dnf install -y mysql-community-client

MySQL 버전 확인

mysql --version
$ mysql --version
mysql  Ver 8.0.36 for Linux on x86_64 (MySQL Community Server - GPL)

 

이제 Amazon Linux 2023 인스턴스에 MySQL 8이 설치되었습니다.

 

728x90
반응형