0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MySQLをインストールしようとしたらエラーになった原因と解決 初心者メモ

Posted at

状況

EC2上にApacheをインストールし終えたので次にMySQLをインストールしたい。

エラー

sudo yum install -y mysql-community-server
Last metadata expiration check: 0:04:50 ago on Sun Apr  6 00:00:00 2025.
Error:
 Problem: conflicting requests

原因

EC2のインスタンスがAmazon Linux2023であった

解決策1

EC2インスタンスをAmazon Linux2で作り直す。
もっとも簡単でLinux2を前提にした情報が多いため現状ではこちらがおすすめかも。

解決策2

Amazon Linux 2023でもMySQLを使うことは可能ですが、Amazon Linux 2までのように簡単にはいかず、MySQL公式リポジトリの追加が必要です。

もしPostgreSQLでも問題ない場合は、Amazon Linux 2023ではPostgreSQLの方がインストールを行います(dnf install postgresql-server でOK)

解決策3

MySQL公式リポジトリを追加

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

リポジトリを有効にして確認

sudo dnf repolist enabled | grep mysql

mySQLをインストール

sudo dnf install -y mysql-community-server

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?