Centos uses rpm to install Mysql

Download the rpm installation package of the RedHat version

Because the official website does not have the rpm installation package of the Centos version, so I choose to download the rpm installation package of the RedHat version, and the effect is the same.

detailed steps

  1. Download link https://dev.mysql.com/downloads/mysql/
  2. Select the mysql version, operating system and operating system version. Here, the operating system is RedHat, and the operating system version depends on your own system. Choose 32-bit or 64-bit
    insert image description here
  3. Here select the first bundle that contains all components, or you can choose to download it separatelyinsert image description here

4. After the download is complete, you can use the rz command (if there is no such command, you need to install yum install lrzsz) to upload the installation package to the Linux system 5. Use the insert image description here
tar -xvzf command to decompress the file
6. Uninstall the mariadb that comes with Centos before installation, First use rpm -qa|grep mariadb * to query the detailed name of the mariadb installation package, and then use the rpm uninstall command
rpm -e mariadb-libs-5.5.64-1.el7.x86_64 --nodeps , ps: --nodeps must be added, yes Ignore dependencies, because other software may depend on mariadb, and it cannot be uninstalled without –nodeps;
7. Use the rpm command to install the server and client in turn;
8. Install the server rpm -ivh MySQL-server-5.5.62- 1.el7.x86_64.rpm , errorinsert image description here

9. The reason is the lack of dependent packages. Install the dependent package yum install -y perl-Module-Install.noarch . If yum cannot be installed, try yum update to update the warehouse
. 10. Try to install the server again, and the installation is successful
. 11. Rpm installs the client, rpm -ivh MySQL-client-5.5.62-1.el7.x86_64.rpm
12. Use the service mysql start command to start the service, and you're doneinsert image description here

Guess you like

Origin blog.csdn.net/qq_15098623/article/details/102964376