Solve the problem that no packages are available for yum install mysql-server under CentOS7.
[Azq @ localhost ~] $ Sudo yum install mysql-server
Loaded plug-ins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* Base: mirrors.163.com
* Extras: mirrors.163.com
* Updates: centos.ustc.edu.cn
There is no available package for mysql-server.
Error: No need to handle [plain] view plaincopy
- # Wgethttp: // repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
Http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
Parsing host repo.mysql.com (repo.mysql.com)... 23.4.241.142
Connecting repo.mysql.com (repo.mysql.com) | 23.4.241.142 |: 80... already connected.
An HTTP request has been sent and is waiting for response... 200 OK
Length: 6140 (6.0 K) [application/x-redhat-package-manager]
Saving to: mysql-community-release-el7-5.noarch.rpm"
100% [============================================== >] 6,140 --. -0 s for K/s
(467 MB/s)-saved MySQL-community-release-el7-5.noarch.rpm [6140/6140])
[Plain] view plaincopy
- # Ls
Mysql-community-release-el7-5.noarch.rpm
[Plain] view plaincopy
- # Rpm-ivhmysql-community-release-el7-5.noarch.rpm
Preparing... ################################# [100%]
Upgrading/installing...
1: mysql-community-release-el7-5 ################################# [100%]
Ps: if the error "can't create transaction lock on/var/lib/rpm/. rpm. lock" occurs
Error cause: permission issues
Solution: Enter the "su" and password on the terminal and log on to the root user. No prompt will be displayed when you log on as the root user.
[Plain] view plaincopy
- # Ls-1/etc/yum. repos. d/mysql-community *
/Etc/yum. repos. d/mysql-community.repo
/Etc/yum. repos. d/mysql-community-source.repo
[Plain] view plaincopy
- # Yuminstallmysql-server