実現したいこと
- amazon linux2023 にmysql8をインストールしたい
前提
dockerをawsのec2インスタンスにデプロイした
DBとしてはRDSを作成
ec2インスタンスからRDSへの接続確認は取れている
発生している問題・エラーメッセージ
amazon linux2023に以下のコマンドでmysql8インストールを試みる失敗する
$ sudo yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm mysql80-community-release-el7-7.noarch.rpm 10 kB/s | 11 kB 00:01 Dependencies resolved. ===================================================================================================================================================================================================================================================== Package Architecture Version Repository Size ===================================================================================================================================================================================================================================================== Upgrading: mysql80-community-release noarch el7-7 @commandline 11 k Transaction Summary ===================================================================================================================================================================================================================================================== Upgrade 1 Package Total size: 11 k Is this ok [y/N]: y Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Upgrading : mysql80-community-release-el7-7.noarch 1/2 Cleanup : mysql80-community-release-el7-3.noarch 2/2 Verifying : mysql80-community-release-el7-7.noarch 1/2 Verifying : mysql80-community-release-el7-3.noarch 2/2 ===================================================================================================================================================================================================================================================== WARNING: A newer release of "Amazon Linux" is available. Available Versions: Version 2023.1.20230628: Run the following command to upgrade to 2023.1.20230628: dnf upgrade --releasever=2023.1.20230628 Release notes: https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes.html Version 2023.1.20230629: Run the following command to upgrade to 2023.1.20230629: dnf upgrade --releasever=2023.1.20230629 Release notes: https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes.html ===================================================================================================================================================================================================================================================== Upgraded: mysql80-community-release-el7-7.noarch Complete!
$ dnf repolist enabled | grep mysql mysql-connectors-community MySQL Connectors Community mysql-tools-community MySQL Tools Community mysql80-community
$ sudo dnf install mysql-community-server MySQL Connectors Community 3.3 MB/s | 55 kB 00:00 MySQL Tools Community 21 MB/s | 925 kB 00:00 Error: Problem: conflicting requests - nothing provides libcrypto.so.10()(64bit) needed by mysql-community-server-8.0.11-1.el7.x86_64 - nothing provides libssl.so.10()(64bit) needed by mysql-community-server-8.0.11-1.el7.x86_64 - nothing provides libcrypto.so.10(libcrypto.so.10)(64bit) needed by mysql-community-server-8.0.11-1.el7.x86_64 - nothing provides libssl.so.10(libssl.so.10)(64bit) needed by mysql-community-server-8.0.11-1.el7.x86_64 - nothing provides libcrypto.so.10()(64bit) needed by mysql-community-server-8.0.12-1.el7.x86_64 - nothing provides libssl.so.10()(64bit) needed by mysql-community-server-8.0.12-1.el7.x86_64 - nothing provides libcrypto.so.10(libcrypto.so.10)(64bit) needed by mysql-community-server-8.0.12-1.el7.x86_64 - nothing provides libssl.so.10(libssl.so.10)(64bit) needed by mysql-community-server-8.0.12-1.el7.x86_64 - nothing provides libcrypto.so.10()(64bit) needed by mysql-community-server-8.0.13-1.el7.x86_64 - nothing provides libssl.so.10()(64bit) needed by mysql-community-server-8.0.13-1.el7.x86_64 - nothing provides libcrypto.so.10(libcrypto.so.10)(64bit) needed by mysql-community-server-8.0.13-1.el7.x86_64 以下、省略
試したこと
デフォルトで入っているsqlが邪魔になっているのかと思い、以下のコマンドを試す
$ sudo dnf module disable mysql Last metadata expiration check: 0:01:16 ago on Thu Jun 29 05:30:30 2023. Unable to resolve argument mysql Error: Problems in request: missing groups or modules: mysql
mariadbが邪魔なのかと思い、以下のコマンドを試すも何も出力されない
$ yum list installed | grep mariadb
インストールしていないパッケージをスキップするために、以下のコマンドを試す
$ sudo dnf install mysql-community-server --skip-broken Last metadata expiration check: 0:45:17 ago on Thu Jun 29 05:30:30 2023. Dependencies resolved. Problem: cannot install the best candidate for the job - nothing provides libcrypto.so.10()(64bit) needed by mysql-community-server-8.0.33-1.el7.x86_64 - nothing provides libssl.so.10()(64bit) needed by mysql-community-server-8.0.33-1.el7.x86_64 - nothing provides libcrypto.so.10(libcrypto.so.10)(64bit) needed by mysql-community-server-8.0.33-1.el7.x86_64 - nothing provides libssl.so.10(libssl.so.10)(64bit) needed by mysql-community-server-8.0.33-1.el7.x86_64 - nothing provides libcrypto.so.10(OPENSSL_1.0.2)(64bit) needed by mysql-community-server-8.0.33-1.el7.x86_64 ===================================================================================================================================================================================================================================================== Package Architecture Version Repository Size ===================================================================================================================================================================================================================================================== Skipping packages with broken dependencies: mysql-community-server x86_64 8.0.33-1.el7 mysql80-community 64 M Transaction Summary ===================================================================================================================================================================================================================================================== Skip 1 Package Nothing to do. Complete!
ec2上からRDSに接続してmysql操作がしたいため今回の運びになりました。
もしsshの接続でec2上に入ってappコンテナに入り、sqlのコマンド実行みたいな形でなく
RDSを操作できる方法はあるのでしょうか。
AWS初心者にて説明不足な点がありますが、お力添えいただければと思います。
補足情報
Rails6
Docker
EC2
RDS