DEV Community

Installing MySQL on Amazon Linux 2023

MySQL does not come by default with Amazon Linux 2023.

I ran into some challenges installing it, and had to consult multiple blogs for success.

Follow these steps to install it.

  1. Download the RPM file
sudo wget https://dev.mysql.com/get/mysql80-community-release-el9-1.noarch.rpm 
Enter fullscreen mode Exit fullscreen mode
  1. Install RPM file
sudo dnf install mysql80-community-release-el9-1.noarch.rpm -y
Enter fullscreen mode Exit fullscreen mode
  1. You need the public key of mysql to install the software.
sudo rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2023
Enter fullscreen mode Exit fullscreen mode
  1. If you need to install mysql client:
sudo dnf install mysql-community-client -y
Enter fullscreen mode Exit fullscreen mode

If you need server:

sudo dnf install mysql-community-server -y
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
shivanisuara profile image
Shivani Suara

Thanks and kudos to you, the detailed steps helped me to install mysql DB in an amazon linux instance easily and without any hiccups ! Keep up the good work !