Installing the RPM Package from the Official Website
The following describes how to install MySQL using the RPM package on the official website. This section describes how to install MySQL 8.0.17 on CentOS 7.6. You can refer to this section when installing MySQL of other versions.
- Configure the local yum source.
- Back up the original yum repository files and create a directory for the repo file.
1 2
mv /etc/yum.repos.d/ /etc/yum.repos.d-bak mkdir /etc/yum.repos.d
- Write the new configuration to the repo file.
1echo -e "[local]\nname=local\nbaseurl=file:///mnt\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/local.repo
- Check whether the new configuration is successfully written to repo in step 1.b.
1cat /etc/yum.repos.d/local.repoIf the command output is the same as the written content in 1.b, the operation is successful. Expected result:
[local] name=local baseurl=file:///mnt gpgcheck=0 enabled=1
- Back up the original yum repository files and create a directory for the repo file.
- Mount the OS image.
Mount the OS image using either of the following methods:
- Method 1: Use the KVM to mount the image to the /mnt/ directory.
1mount /dev/sr0 /mnt/
- Method 2: Upload the OS image to the /home directory and mount the image to the /mnt/ directory.
1mount /home/CentOS-7-aarch64-Everything-1810.iso /mnt/
Change the ISO file name based on your OS type.
- Method 1: Use the KVM to mount the image to the /mnt/ directory.
- Download the RPM package from the official website.
- Download the MySQL RPM package.
Download URL: https://downloads.mysql.com/archives/community/

- Create a mysql-rpm folder in the /home partition on the server, and upload the RPM package to the folder.
1mkdir /home/mysql-rpm - Go to the directory of the RPM package and decompress the RPM package.
1 2
cd /home/mysql-rpm tar xvf mysql-8.0.17-1.el7.aarch64.rpm-bundle.tar
If the following information is displayed, the RPM installation package is decompressed successfully:
mysql-community-libs-compat-8.0.17-1.el7.aarch64.rpm mysql-community-devel-8.0.17-1.el7.aarch64.rpm mysql-community-server-8.0.17-1.el7.aarch64.rpm mysql-community-common-8.0.17-1.el7.aarch64.rpm mysql-community-libs-8.0.17-1.el7.aarch64.rpm mysql-community-test-8.0.17-1.el7.aarch64.rpm mysql-community-embedded-compat-8.0.17-1.el7.aarch64.rpm mysql-community-client-8.0.17-1.el7.aarch64.rpm You have new mail in /var/spool/mail/root
- Download the MySQL RPM package.
- Uninstall mariadb-libs of the OS. Otherwise, mysql-community-libs cannot be installed.
1yum -y remove mariadb-libs
- Install dependencies.
1yum -y install net-tools
- Go to the mysql-rpm directory and install the MySQL RPM packages.
1 2 3 4 5
cd /home/mysql-rpm rpm -ivh mysql-community-common-8.0.17-1.el7.aarch64.rpm rpm -ivh mysql-community-libs-8.0.17-1.el7.aarch64.rpm rpm -ivh mysql-community-client-8.0.17-1.el7.aarch64.rpm rpm -ivh mysql-community-server-8.0.17-1.el7.aarch64.rpm
Expected result:
[root@localhost mysql-rpm]# rpm -ivh mysql-community-common-8.0.17-1.el7.aarch64.rpm warning: mysql-community-common-8.0.17-1.el7.aarch64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql-community-common-8.0.17-1.e################################# [100%] [root@localhost mysql-rpm]# rpm -ivh mysql-community-libs-8.0.17-1.el7.aarch64.rpm warning: mysql-community-libs-8.0.17-1.el7.aarch64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql-community-libs-8.0.17-1.el7################################# [100%] [root@localhost mysql-rpm]# rpm -ivh mysql-community-client-8.0.17-1.el7.aarch64.rpm warning: mysql-community-client-8.0.17-1.el7.aarch64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql-community-client-8.0.17-1.e################################# [100%] [root@localhost mysql-rpm]# rpm -ivh mysql-community-server-8.0.17-1.el7.aarch64.rpm warning: mysql-community-server-8.0.17-1.el7.aarch64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql-community-server-8.0.17-1.e################################# [100%]
Parent topic: Installing MySQL on a Physical Machine