To install MySQL Shell in Centos8,we follow the same steps as descriped for Ubuntu - But first we need to make sure the default MySQL package present in Centos 8 is disabled.
[root@DBAMAXWELL ~]# yum remove mysql-community-release -y
No match for argument: mysql-community-release
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
[root@DBAMAXWELL ~]# dnf erase mysql-community-release
No match for argument: mysql-community-release
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
[root@DBAMAXWELL ~]# yum install https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm -y
Last metadata expiration check: 2:23:47 ago on Tue 15 Mar 2022 01:17:34 PM CST.
mysql80-community-release-el8-1.noarch.rpm 5.2 kB/s | 30 kB 00:05
Dependencies resolved.
==================================================================================================================================================
Package Architecture Version Repository Size
==================================================================================================================================================
Installing:
mysql80-community-release noarch el8-1 @commandline 30 k
Transaction Summary
==================================================================================================================================================
Install 1 Package
Total size: 30 k
Installed size: 29 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : mysql80-community-release-el8-1.noarch 1/1
warning: /etc/yum.repos.d/mysql-community.repo created as /etc/yum.repos.d/mysql-community.repo.rpmnew
Verifying : mysql80-community-release-el8-1.noarch 1/1
Installed:
mysql80-community-release-el8-1.noarch
Complete!
[root@DBAMAXWELL ~]#
With the repository installed ,we will install the MySQL Shell binary
[root@DBAMAXWELL ~]# yum install mysql-shell -y
Last metadata expiration check: 2:28:20 ago on Tue 15 Mar 2022 01:17:34 PM CST.
Dependencies resolved.
==================================================================================================================================================
Package Architecture Version Repository Size
==================================================================================================================================================
Installing:
mysql-shell x86_64 8.0.28-1.el7 mysql-tools-community 33 M
Transaction Summary
==================================================================================================================================================
Install 1 Package
Total download size: 33 M
Installed size: 162 M
Downloading Packages:
[MIRROR] mysql-shell-8.0.28-1.el7.x86_64.rpm: Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-community/el/7/x86_64/mysql-shell-8.0.28-1.el7.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]
mysql-shell-8.0.28-1.el7.x86_64.rpm 17 kB/s | 33 MB 32:03
--------------------------------------------------------------------------------------------------------------------------------------------------
Total 17 kB/s | 33 MB 32:03
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : mysql-shell-8.0.28-1.el7.x86_64 1/1
Running scriptlet: mysql-shell-8.0.28-1.el7.x86_64 1/1
Verifying : mysql-shell-8.0.28-1.el7.x86_64 1/1
Installed:
mysql-shell-8.0.28-1.el7.x86_64
Complete!
[root@DBAMAXWELL ~]#
And we can validate that the installation worked by running it:
[root@DBAMAXWELL ~]# mysqlsh
MySQL Shell 8.0.28
Copyright (c) 2016, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.
Type '\help' or '\?' for help; '\quit' to exit.
MySQL JS >