R1-003 MySQL的rpm安装实例
发表于:2026-11-01 作者:千家信息网编辑
千家信息网最后更新 2026年11月01日,1、解压tar包 [root@hhu MySQL]# tar -xvf mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar mysql-community-test-5.
千家信息网最后更新 2026年11月01日R1-003 MySQL的rpm安装实例1、解压tar包 [root@hhu MySQL]# tar -xvf mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar mysql-community-test-5.7.17-1.el6.x86_64.rpm mysql-community-embedded-5.7.17-1.el6.x86_64.rpm mysql-community-embedded-devel-5.7.17-1.el6.x86_64.rpm mysql-community-server-5.7.17-1.el6.x86_64.rpm mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm mysql-community-devel-5.7.17-1.el6.x86_64.rpm mysql-community-client-5.7.17-1.el6.x86_64.rpm mysql-community-libs-5.7.17-1.el6.x86_64.rpm mysql-community-common-5.7.17-1.el6.x86_64.rpm [root@hhu MySQL]# ls mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar mysql-community-embedded-devel-5.7.17-1.el6.x86_64.rpm mysql-community-client-5.7.17-1.el6.x86_64.rpm mysql-community-libs-5.7.17-1.el6.x86_64.rpm mysql-community-common-5.7.17-1.el6.x86_64.rpm mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm mysql-community-devel-5.7.17-1.el6.x86_64.rpm mysql-community-server-5.7.17-1.el6.x86_64.rpm mysql-community-embedded-5.7.17-1.el6.x86_64.rpm mysql-community-test-5.7.17-1.el6.x86_64.rpm 2、卸载已有老版本MySQL [root@hhu MySQL]# rpm -qa|grep mysql mysql-5.1.71-1.el6.x86_64 mysql-devel-5.1.71-1.el6.x86_64 mysql-libs-5.1.71-1.el6.x86_64 [root@hhu MySQL]# rpm -e mysql-5.1.71-1.el6.x86_64 error: Failed dependencies: mysql = 5.1.71-1.el6 is needed by (installed) mysql-devel-5.1.71-1.el6.x86_64 [root@hhu MySQL]# rpm -e mysql-devel-5.1.71- [root@hhu MySQL]# rpm -qa|grep mysql mysql-5.1.71-1.el6.x86_64 mysql-libs-5.1.71-1.el6.x86_64 [root@hhu MySQL]# rpm -e mysql-5.1.71-1.el6.x86_64 [root@hhu MySQL]# rpm -e mysql-libs-5.1.71-1.el6.x86_64 error: Failed dependencies: libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64 libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64 mysql-libs is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64 [root@hhu MySQL]# rpm -e mysql-libs-5.1.71-1.el6.x86_64 --nodeps 强制卸载 [root@hhu MySQL]# rpm -qa|grep mysql [root@hhu MySQL]# 3、安装MySQL包,一共5个,会有依赖关系,安装顺序如下: rpm -Uvh mysql-community-common-5.7.17-1.el6.x86_64.rpm rpm -Uvh mysql-community-libs-5.7.17-1.el6.x86_64.rpm rpm -Uvh mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm rpm -Uvh mysql-community-client-5.7.17-1.el6.x86_64.rpm rpm -Uvh mysql-community-server-5.7.17-1.el6.x86_64.rpm [root@hhu MySQL]# ls mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar mysql-community-embedded-devel-5.7.17-1.el6.x86_64.rpm mysql-community-client-5.7.17-1.el6.x86_64.rpm mysql-community-libs-5.7.17-1.el6.x86_64.rpm mysql-community-common-5.7.17-1.el6.x86_64.rpm mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm mysql-community-devel-5.7.17-1.el6.x86_64.rpm mysql-community-server-5.7.17-1.el6.x86_64.rpm mysql-community-embedded-5.7.17-1.el6.x86_64.rpm mysql-community-test-5.7.17-1.el6.x86_64.rpm [root@hhu MySQL]# rpm -Uvh mysql-community-common-5.7.17-1.el6.x86_64.rpm warning: mysql-community-common-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-common ########################################### [100%] [root@hhu MySQL]# rpm -Uvh mysql-community-libs-5.7.17-1.el6.x86_64.rpm warning: mysql-community-libs-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-libs ########################################### [100%] [root@hhu MySQL]# rpm -Uvh mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm warning: mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-libs-co########################################### [100%] [root@hhu MySQL]# rpm -Uvh mysql-community-client-5.7.17-1.el6.x86_64.rpm warning: mysql-community-client-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-client ########################################### [100%] [root@hhu MySQL]# rpm -Uvh mysql-community-server-5.7.17-1.el6.x86_64.rpm warning: mysql-community-server-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-server ########################################### [100%] [root@hhu MySQL]# service mysqld status mysqld is stopped [root@hhu MySQL]# service mysqld start Initializing MySQL database: [ OK ] Installing validate password plugin: [ OK ] Starting mysqld: [ OK ] 4、获取超级数据库用户临时密码,登录,修改密码 [root@hhu MySQL]# grep 'temporary password' /var/log/mysqld.log 2017-02-23T01:36:39.249352Z 1 [Note] A temporary password is generated for root@localhost: i7NmqxstDZ?L [root@hhu MySQL]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.17 Copyright (c) 2000, 2016, 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> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'; Query OK, 0 rows affected (0.00 sec)
mysql> quit Bye
mysql> quit Bye
密码
数据
数据库
版本
用户
顺序
强制
登录
实例
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
互联网络科技
科技金融是不是互联网金融
互联网通讯科技
河南真二互联网科技有限公司
没上市的科技互联网公司
麻工互联网科技
深圳科技互联网
上游互联网科技
大白互联网科技
武汉健翔互联网络科技有限公司
银川新华互联网科技学校联系电话
中和天地互联网科技有限公司
互联网时代的科技公司
启辰互联网科技
互联网领先科技宣传片
全球科技与互联网公司市值变化
杭州融税互联网科技有限公司
互联网领先科技成果宣传视频
银川新华互联网科技学校招聘
高科技和互联网的现代国家
南京欣网互联网络科技
互联网科技金融公司
互联网科技网站
上海亿帐通互联网科技
滨湖区互联网智能科技产品供应
互联网和高科技公司
湖北码尼互联网科技有限公司电话
开一家科技互联网公司需要多少钱
互联网对科技影响
宁波允成互联网科技有限公司