I. Download the installation package
First download the RPM Bundle installation package (family buckets, not one by one), download address:
Select Platform chooses Red Hat Enterprise Linux / Oracle Linux because CentOS is the Red Hat family.
How do you find out which one you want to install for such a large RPM installation package list? It's easy to find rules by careful observation.
- Find the version of your own CentOS system first, such as mine is CentOS 6.5. How to look at Linux 6 first? In fact, the name of RPM installation package also contains system version information, such as El6 in MySQL-server-5.6.35-1.el6.x86_64.rpm.
- Then find the corresponding operating system number, 64-bit is (x86, 64-bit), 32-bit is (x86, 32-bit).
- Find the Bundle collection package or a separate RPM file. Bundle file names are generally MySQL-5.6.35-1.el6.x86_64.rpm-bundle.tar (64 bits). The general name of a single RPM installation package is MySQL-server-5.6.35-1.el6.x86_64.rpm (64 bits)
Usually download Bundle family bucket, download it and then decompress, otherwise download one by one is too troublesome.
My system is CentOS 6.564 bits, so next is MySQL-5.6.35-1.el6.x86_64.rpm-bundle.tar.
Actually, there is nothing new. Now when you decompress the Bundle, you can see the included RPM installation package.
# tar -zxf MySQL-5.6.35-1.el6.x86_64.rpm-bundle.tar -C MySQL-bundle
The above command indicates that the. tar file is decompressed into the MySQL-bundle directory of our current directory. View the list of unzipped RPM installation packages:
# cd MySQL-bundle
# ll
2. Check and remove installed Msql-related software
# rpm -qa | grep -i mysql
mysql-libs-5.1.71-1.el6.i686
The above display system has installed mysql-libs-5.1.71-1.el6.i686.
This article It is mentioned that it relies on several software, among which postfix relies on mysql-libs in mini version.
If deleted directly, there is a risk of dependency.
Official documents Installing MySQL on Linux Using RPM Packages Say installing MySQL-shared-compat first and then removing mysql-libs manually. The original text is intercepted as follows:
MySQL-shared-compat can safely be installed alongside mysql-libs because libraries are installed to different locations.
Therefore, it is possible to install MySQL-shared-compat first, then manually remove mysql-libs before continuing with
the installation. After mysql-libs is removed, the dynamic linker stops looking for the client library in the location where mysql-libs
puts it, and the library provided by the MySQL-shared-compat package takes over.
Another alternative is to install packages using yum. In a directory containing all RPM packages for a MySQL release,
yum install MySQL*rpm installs them in the correct order and removes mysql-libs in one step without conflicts.
Install MySQL-shared-compat first
# rpm -ivh MySQL-shared-compat-5.6.35-1.el6.x86_64.rpm
Look again:
# rpm -qa | grep -i mysql
Then remove mysql-libs
# yum remove mysql-libs
III. Inspection of Installation Conditions
Test MySQL-server installation. The test option will not be fully installed, but simply checks for potential installation conflicts.
# rpm -ivh --test MySQL-server-5.6.21-1.el6.i686.rpm
If you are prompted to lack libaio-related dependencies, install:
# yum install libaio.x86_64 libaio-devel.x86_64
Reference resources: MYSQL 5.6 install error from missing dependency libaio
If you are prompted to lack libnuma-related dependencies, install:
# yum install numactl
Reference resources: Centos 6.5 Installation Configuration mysql
If it's OK (continue Google if you have any more problems), you can install it:
# rpm -ivh MySQL-server-5.6.21-1.el6.i686.rpm
Four, summary
The overall steps are as follows:
- Download the installation package
- Check and remove installed Msql related software
- Inspection of Installation Conditions
- install