MySQL
EC2
MySQLShell

MySQL ShellをEC2にインストール

インストール方法

EC2のAmazon Linux AMI 2017.09.1にMySQL Shellをインストールしてみた。

$ wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
$ sudo rpm -Uvh mysql57-community-release-el6-11.noarch.rpm

$ yum repolist all | grep mysql
mysql-cluster-7.5-community/x86_64 MySQL Cluster 7.5 Community       無効
mysql-cluster-7.5-community-source MySQL Cluster 7.5 Community - Sou 無効
mysql-cluster-7.6-community/x86_64 MySQL Cluster 7.6 Community       無効
mysql-cluster-7.6-community-source MySQL Cluster 7.6 Community - Sou 無効
mysql-connectors-community/x86_64  MySQL Connectors Community        有効:  34+8
mysql-connectors-community-source  MySQL Connectors Community - Sour 無効
mysql-tools-community/x86_64       MySQL Tools Community             有効:    51
mysql-tools-community-source       MySQL Tools Community - Source    無効
mysql-tools-preview/x86_64         MySQL Tools Preview               無効
mysql-tools-preview-source         MySQL Tools Preview - Source      無効
mysql55-community/x86_64           MySQL 5.5 Community Server        無効
mysql55-community-source           MySQL 5.5 Community Server - Sour 無効
mysql56-community/x86_64           MySQL 5.6 Community Server        無効
mysql56-community-source           MySQL 5.6 Community Server - Sour 無効
mysql57-community/x86_64           MySQL 5.7 Community Server        有効:   219
mysql57-community-source           MySQL 5.7 Community Server - Sour 無効
mysql80-community/x86_64           MySQL 8.0 Community Server        無効
mysql80-community-source           MySQL 8.0 Community Server - Sour 無効

$ sudo yum -y install mysql-shell
...
完了しました!

$ which mysqlsh
/usr/bin/mysqlsh

2017/11/25時点では下記のパッケージがインストールされた。

  • python26-2.6.9-2.89.amzn1.x86_64
  • python26-libs-2.6.9-2.89.amzn1.x86_64
  • mysql-shell-1.0.10-1.el6.x86_64

アンインストールは以下。

$ sudo yum autoremove mysql-shell
...
Dependencies Resolved

======================================================================================================================================================
 Package                           Arch                       Version                                Repository                                  Size
======================================================================================================================================================
Removing:
 mysql-shell                       x86_64                     8.0.12-1.el6                           @mysql-tools-community                      25 M
Removing for dependencies:
 python26                          x86_64                     2.6.9-2.89.amzn1                       @amzn-updates                               19 M
 python26-libs                     x86_64                     2.6.9-2.89.amzn1                       @amzn-updates                              1.7 M

Transaction Summary
======================================================================================================================================================
Remove  1 Package (+2 Dependent packages)
...