[root@db ~]# rpm -qa | grep mysql*
mysql57-community-release-el7-8.noarch
[root@db ~]# yum list installed | grep mysql
mysql57-community-release.noarch
el7-8 @/mysql57-community-release-el7-8.noarch
[root@db ~]# yum install mysql
已加载插件:fastestmirror, refresh-packagekit
设置安装进程
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
mysql-connectors-community | 2.5 kB 00:00
mysql-connectors-community/primary_db | 29 kB 00:00
mysql-tools-community | 2.5 kB 00:00
mysql-tools-community/primary_db | 48 kB 00:00
mysql57-community | 2.5 kB 00:00
updates | 3.4 kB 00:00
Package mysql is obsoleted by mysql-community-client, trying to install mysql-community-client-5.7.24-1.el7.x86_64 instead
解决依赖关系
--> 执行事务检查
---> Package mysql-community-client.x86_64 0:5.7.24-1.el7 will be 安装
--> 处理依赖关系 mysql-community-libs(x86-64) >= 5.7.9,它被软件包 mysql-community-client-5.7.24-1.el7.x86_64 需要
--> 处理依赖关系 libstdc++.so.6(GLIBCXX_3.4.15)(64bit),它被软件包 mysql-community-client-5.7.24-1.el7.x86_64 需要
--> 处理依赖关系 libc.so.6(GLIBC_2.14)(64bit),它被软件包 mysql-community-client-5.7.24-1.el7.x86_64 需要
--> 执行事务检查
---> Package mysql-community-client.x86_64 0:5.7.24-1.el7 will be 安装
--> 处理依赖关系 libstdc++.so.6(GLIBCXX_3.4.15)(64bit),它被软件包 mysql-community-client-5.7.24-1.el7.x86_64 需要
--> 处理依赖关系 libc.so.6(GLIBC_2.14)(64bit),它被软件包 mysql-community-client-5.7.24-1.el7.x86_64 需要
---> Package mysql-community-libs.x86_64 0:5.7.24-1.el7 will be 安装
--> 处理依赖关系 mysql-community-common(x86-64) >= 5.7.9,它被软件包 mysql-community-libs-5.7.24-1.el7.x86_64 需要
--> 处理依赖关系 libc.so.6(GLIBC_2.14)(64bit),它被软件包 mysql-community-libs-5.7.24-1.el7.x86_64 需要
--> 执行事务检查
---> Package mysql-community-client.x86_64 0:5.7.24-1.el7 will be 安装
--> 处理依赖关系 libstdc++.so.6(GLIBCXX_3.4.15)(64bit),它被软件包 mysql-community-client-5.7.24-1.el7.x86_64 需要
--> 处理依赖关系 libc.so.6(GLIBC_2.14)(64bit),它被软件包 mysql-community-client-5.7.24-1.el7.x86_64 需要
---> Package mysql-community-common.x86_64 0:5.7.24-1.el7 will be 安装
---> Package mysql-community-libs.x86_64 0:5.7.24-1.el7 will be 安装
--> 处理依赖关系 libc.so.6(GLIBC_2.14)(64bit),它被软件包 mysql-community-libs-5.7.24-1.el7.x86_64 需要
--> 完成依赖关系计算
错误:Package: mysql-community-client-5.7.24-1.el7.x86_64 (mysql57-community)
Requires: libc.so.6(GLIBC_2.14)(64bit)
错误:Package: mysql-community-client-5.7.24-1.el7.x86_64 (mysql57-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
错误:Package: mysql-community-libs-5.7.24-1.el7.x86_64 (mysql57-community)
Requires: libc.so.6(GLIBC_2.14)(64bit)
You could try using --skip-broken to work around the problem
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
2:postfix-2.6.6-8.el6.x86_64 has missing requires of libmysqlclient.so.16()(64bit)
2:postfix-2.6.6-8.el6.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)
2:postfix-2.6.6-8.el6.x86_64 has missing requires of mysql-libs
[root@db ~]# yum list installed | grep mysql
mysql57-community-release.noarch
el7-8 @/mysql57-community-release-el7-8.noarch
[root@db ~]# yum remove -y mysql57-community-release.noarch
已加载插件:fastestmirror, refresh-packagekit
设置移除进程
解决依赖关系
--> 执行事务检查
---> Package mysql57-community-release.noarch 0:el7-8 will be 删除
--> 完成依赖关系计算
依赖关系解决
===================================================================================================================================================================================
软件包 架构 版本 仓库 大小
===================================================================================================================================================================================
正在删除:
mysql57-community-release noarch el7-8 @/mysql57-community-release-el7-8.noarch 8.2 k
事务概要
===================================================================================================================================================================================
Remove 1 Package(s)
Installed size: 8.2 k
下载软件包:
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在删除 : mysql57-community-release-el7-8.noarch 1/1
Verifying : mysql57-community-release-el7-8.noarch 1/1
删除:
mysql57-community-release.noarch 0:el7-8
完毕!
[root@db ~]# yum list installed | grep mysql
[root@db ~]# yum install mysql
已加载插件:fastestmirror, refresh-packagekit
设置安装进程
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
解决依赖关系
--> 执行事务检查
---> Package mysql.x86_64 0:5.1.73-8.el6_8 will be 安装
--> 处理依赖关系 mysql-libs = 5.1.73-8.el6_8,它被软件包 mysql-5.1.73-8.el6_8.x86_64 需要
--> 处理依赖关系 libmysqlclient_r.so.16(libmysqlclient_16)(64bit),它被软件包 mysql-5.1.73-8.el6_8.x86_64 需要
--> 处理依赖关系 libmysqlclient.so.16(libmysqlclient_16)(64bit),它被软件包 mysql-5.1.73-8.el6_8.x86_64 需要
--> 处理依赖关系 libmysqlclient_r.so.16()(64bit),它被软件包 mysql-5.1.73-8.el6_8.x86_64 需要
--> 处理依赖关系 libmysqlclient.so.16()(64bit),它被软件包 mysql-5.1.73-8.el6_8.x86_64 需要
--> 执行事务检查
---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be 安装
--> 完成依赖关系计算
依赖关系解决
===================================================================================================================================================================================
软件包 架构 版本 仓库 大小
===================================================================================================================================================================================
正在安装:
mysql x86_64 5.1.73-8.el6_8 base 895 k
为依赖而安装:
mysql-libs x86_64 5.1.73-8.el6_8 base 1.2 M
事务概要
===================================================================================================================================================================================
Install 2 Package(s)
总下载量:2.1 M
Installed size: 6.4 M
确定吗?[y/N]:y
下载软件包:
(1/2): mysql-5.1.73-8.el6_8.x86_64.rpm | 895 kB 00:00
(2/2): mysql-libs-5.1.73-8.el6_8.x86_64.rpm | 1.2 MB 00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计 4.0 MB/s | 2.1 MB 00:00
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在安装 : mysql-libs-5.1.73-8.el6_8.x86_64 1/2
正在安装 : mysql-5.1.73-8.el6_8.x86_64 2/2
Verifying : mysql-5.1.73-8.el6_8.x86_64 1/2
Verifying : mysql-libs-5.1.73-8.el6_8.x86_64 2/2
已安装:
mysql.x86_64 0:5.1.73-8.el6_8
作为依赖被安装:
mysql-libs.x86_64 0:5.1.73-8.el6_8
完毕!
[root@db ~]# yum install mysql-server
已加载插件:fastestmirror, refresh-packagekit
设置安装进程
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
解决依赖关系
--> 执行事务检查
---> Package mysql-server.x86_64 0:5.1.73-8.el6_8 will be 安装
--> 处理依赖关系 perl-DBI,它被软件包 mysql-server-5.1.73-8.el6_8.x86_64 需要
--> 处理依赖关系 perl-DBD-MySQL,它被软件包 mysql-server-5.1.73-8.el6_8.x86_64 需要
--> 处理依赖关系 perl(DBI),它被软件包 mysql-server-5.1.73-8.el6_8.x86_64 需要
--> 执行事务检查
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be 安装
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be 安装
--> 完成依赖关系计算
依赖关系解决
===================================================================================================================================================================================
软件包 架构 版本 仓库 大小
===================================================================================================================================================================================
正在安装:
mysql-server x86_64 5.1.73-8.el6_8 base 8.6 M
为依赖而安装:
perl-DBD-MySQL x86_64 4.013-3.el6 base 134 k
perl-DBI x86_64 1.609-4.el6 base 705 k
事务概要
===================================================================================================================================================================================
Install 3 Package(s)
总下载量:9.4 M
Installed size: 27 M
确定吗?[y/N]:y
下载软件包:
(1/3): mysql-server-5.1.73-8.el6_8.x86_64.rpm | 8.6 MB 00:00
(2/3): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm | 134 kB 00:00
(3/3): perl-DBI-1.609-4.el6.x86_64.rpm | 705 kB 00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计 10 MB/s | 9.4 MB 00:00
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在安装 : perl-DBI-1.609-4.el6.x86_64 1/3
正在安装 : perl-DBD-MySQL-4.013-3.el6.x86_64 2/3
正在安装 : mysql-server-5.1.73-8.el6_8.x86_64 3/3
warning: /var/log/mysqld.log created as /var/log/mysqld.log.rpmnew
Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64 1/3
Verifying : mysql-server-5.1.73-8.el6_8.x86_64 2/3
Verifying : perl-DBI-1.609-4.el6.x86_64 3/3
已安装:
mysql-server.x86_64 0:5.1.73-8.el6_8
作为依赖被安装:
perl-DBD-MySQL.x86_64 0:4.013-3.el6 perl-DBI.x86_64 0:1.609-4.el6
完毕!
[root@db ~]# yum install mysql-devel
已加载插件:fastestmirror, refresh-packagekit
设置安装进程
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
解决依赖关系
--> 执行事务检查
---> Package mysql-devel.x86_64 0:5.1.73-8.el6_8 will be 安装
--> 完成依赖关系计算
依赖关系解决
===================================================================================================================================================================================
软件包 架构 版本 仓库 大小
===================================================================================================================================================================================
正在安装:
mysql-devel x86_64 5.1.73-8.el6_8 base 130 k
事务概要
===================================================================================================================================================================================
Install 1 Package(s)
总下载量:130 k
Installed size: 388 k
确定吗?[y/N]:y
下载软件包:
mysql-devel-5.1.73-8.el6_8.x86_64.rpm | 130 kB 00:00
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在安装 : mysql-devel-5.1.73-8.el6_8.x86_64 1/1
Verifying : mysql-devel-5.1.73-8.el6_8.x86_64 1/1
已安装:
mysql-devel.x86_64 0:5.1.73-8.el6_8
完毕!
[root@db ~]# service mysqld start
初始化 MySQL 数据库: Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h db password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
[确定]
正在启动 mysqld: [确定]
[root@db ~]# chkconfig mysqld on
[root@db ~]# chkconfig --list mysqld
mysqld 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
[root@db ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>