1、rpm bundel包下载到 /usr/local/src中:

[root@localhost src]# ls
mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar

2解压缩bundle包

[root@localhost src]# tar xf mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar
[root@localhost src]# ls
mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar
mysql-community-client-5.7.11-1.el6.x86_64.rpm
mysql-community-common-5.7.11-1.el6.x86_64.rpm
mysql-community-devel-5.7.11-1.el6.x86_64.rpm
mysql-community-embedded-5.7.11-1.el6.x86_64.rpm
mysql-community-embedded-devel-5.7.11-1.el6.x86_64.rpm
mysql-community-libs-5.7.11-1.el6.x86_64.rpm
mysql-community-libs-compat-5.7.11-1.el6.x86_64.rpm
mysql-community-server-5.7.11-1.el6.x86_64.rpm
mysql-community-test-5.7.11-1.el6.x86_64.rpm

安装必须组件:

yum install numactl
yum install libaio
yum install perl-Time-HiRes per-devel

3.安装mysql-community-server之前,必须安装mysql-community-client和mysql-community-common  rpm包。而安装community-client和community-common包之前,必须删除mysql-lib(系统自带的版本过低)

[root@localhost src]# rpm -qa | grep mysql
mysql-libs-5.1.73-3.el6_5.x86_64[root@localhost src]# yum remove mysql-libs
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 19475.
Another app is currently holding the yum lock; waiting for it to exit...The other application is: PackageKitMemory :  39 M RSS (569 MB VSZ)Dependencies Resolved===========================================================================================Package                              Arch                         Version                                Repositor
===================================================================================================================
Removing:mysql-libs                           x86_64                       5.1.73-3.el6_5                         @anaconda
Removing for dependencies:cronie                               x86_64                       1.4.4-12.el6                           @anacondacronie-anacron                       x86_64                       1.4.4-12.el6                           @anacondacrontabs                             noarch                       1.10-33.el6                            @anacondapostfix                              x86_64                       2:2.6.6-6.el6_5                        @anacondasysstat                              x86_64                       9.0.4-27.el6                           @anacondaTransaction Summary
===================================================================================================================
Remove        6 Package(s)Installed size: 15 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running TransactionErasing    : sysstat-9.0.4-27.el6.x86_64                                                                         Erasing    : cronie-1.4.4-12.el6.x86_64                                                                          Erasing    : cronie-anacron-1.4.4-12.el6.x86_64                                                                  Erasing    : crontabs-1.10-33.el6.noarch                                                                         Erasing    : 2:postfix-2.6.6-6.el6_5.x86_64                                                                      Erasing    : mysql-libs-5.1.73-3.el6_5.x86_64                                                                    Verifying  : cronie-anacron-1.4.4-12.el6.x86_64                                                                  Verifying  : mysql-libs-5.1.73-3.el6_5.x86_64                                                                    Verifying  : sysstat-9.0.4-27.el6.x86_64                                                                         Verifying  : crontabs-1.10-33.el6.noarch                                                                         Verifying  : cronie-1.4.4-12.el6.x86_64                                                                          Verifying  : 2:postfix-2.6.6-6.el6_5.x86_64                                                                      Removed:mysql-libs.x86_64 0:5.1.73-3.el6_5                                                                               Dependency Removed:cronie.x86_64 0:1.4.4-12.el6    cronie-anacron.x86_64 0:1.4.4-12.el6    crontabs.noarch 0:1.10-33.el6    postfix.Complete!

4.上面卸载了mysql-lib旧的包,现在安装mysql-lib最新版的文件,这个包在rpm-bundle里面都有,

直接安装即可

[root@localhost src]# rpm -ivh mysql-community-common-5.7.11-1.el6.x86_64.rpm
warning: mysql-community-common-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]1:mysql-community-common ########################################### [100%]
[root@localhost src]# ls
mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar        mysql-community-embedded-5.7.11-1.el6.x86_64.rpm        mysql-commu
mysql-community-client-5.7.11-1.el6.x86_64.rpm  mysql-community-embedded-devel-5.7.11-1.el6.x86_64.rpm  mysql-commu
mysql-community-common-5.7.11-1.el6.x86_64.rpm  mysql-community-libs-5.7.11-1.el6.x86_64.rpm
mysql-community-devel-5.7.11-1.el6.x86_64.rpm   mysql-community-libs-compat-5.7.11-1.el6.x86_64.rpm
[root@localhost src]# rpm -ivh mysql-community-libs-5.7.11-1.el6.x86_64.rpm
warning: mysql-community-libs-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]1:mysql-community-libs   ########################################### [100%]
[root@localhost src]# rpm -ivh mysql-community-client-5.7.11-1.el6.x86_64.rpm
warning: mysql-community-client-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]1:mysql-community-client ########################################### [100%]
[root@localhost src]# rpm -ivh mysql-community-server-5.7.11-1.el6.x86_64.rpm
warning: mysql-community-server-5.7.11-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]1:mysql-community-server ########################################### [100%]

5.启动mysql 服务

[root@localhost src]# service mysql start
mysql: unrecognized service
[root@localhost src]# service mysqld start
Initializing MySQL database:                               [  OK  ]
Installing validate password plugin:                       [  OK  ]
Starting mysqld:                                           [  OK  ]
[root@localhost src]# netstat -tlunp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1525/sshd
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1384/cupsd
tcp        0      0 :::22                       :::*                        LISTEN      1525/sshd
tcp        0      0 ::1:631                     :::*                        LISTEN      1384/cupsd
tcp        0      0 :::3306                     :::*                        LISTEN      19928/mysqld
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               19346/dhclient
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               1384/cupsd

6.rpm安装mysql后,会自动初始化一个密码,在日志中

[root@localhost src]# cat /var/log/mysqld.log | more
2016-03-11T01:44:19.913630Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --ex
plicit_defaults_for_timestamp server option (see documentation for more details).
2016-03-11T01:44:22.271099Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-03-11T01:44:22.584299Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-03-11T01:44:23.050146Z 0 [Warning] No existing UUID has been found, so we assume that this is the firsttime that this server has been started. Generating a new UUID: c7bf1a6a-e72a-11e5-8737-000c29a05942.
2016-03-11T01:44:23.062259Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cann
ot be opened.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++2016-03-11T01:44:23.093873Z 1 [Note] A temporary password is generated for root@localhost: 8%<rjn;+,11Y+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2016-03-11T01:44:28.470492Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --ex
plicit_defaults_for_timestamp server option (see documentation for more details).
2016-03-11T01:44:28.471726Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.11) starting as process 19672 ...
2016-03-11T01:44:28.626135Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-03-11T01:44:28.626205Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-03-11T01:44:28.626220Z 0 [Note] InnoDB: Uses event mutexes
2016-03-11T01:44:28.626233Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier

7.修改 mysql root密码,由于最新的mysql版本对密码策略有要求,所以必须增加复杂程度才能通过

注意,用刚才的随机密码登陆mysql.

[root@localhost src]# mysql -uroot -p
Enter password: 此处输入刚才日志文件中的随机密码
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.7.11Copyright (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> set password='Yes@126.com';
Query OK, 0 rows affected (0.15 sec)mysql> quit;
Bye[root@localhost src]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.7.11 MySQL Community Server (GPL)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只允许locathost本地登陆,用mysql workbentch 是无法远程登陆的。

root@localhost,代表root只允许本地用户登陆,

所以必须允许root 从任何ip地址登陆。

mysql> grant all privileges on *.* to 'root'@'%' identified by 'Yes@126.com';

rpm方式安装mysql-5.7.11相关推荐

  1. mysql5.7.11 linux_CentOS 7 中以命令行方式安装 MySQL 5.7.11 for Linux Generic 二进制版本教程详解...

    MySQL 目前的最新版本是 5.7.11,在 Linux 下提供特定发行版安装包(如 .rpm)以及二进制通用版安装包(.tar.gz).一般情况下,很多项目都倾向于采用二进制通用安装包形式来进行安 ...

  2. linux下rpm方式安装mysql(2012-5-12)

    由于感觉前几篇博客中关于linux下rpm方式安装mysql的方法问题太多,今天抽时间重新实践和整理了一下,现在拿出来和大家分享,希望对家有用. 系统环境: Rat had enterprise li ...

  3. ipad上能安装mysql_CentOS以RPM方式安装MYSQL

    CentOS5.6以RPM方式安装MySQL5.6 1.检查MySQL及相关RPM包,是否安装,如果有安装,则移除(rpm –e 名称) [root@localhost ~]# rpm -qa | g ...

  4. centos 安装mysql 5.7.9_CentOS 6.6下RPM方式安装MySQL 5.7.9

    说明: 从MySQL5.7.4起,以RPM包的方式安装后的MySQL的部署,默认是安全的,并且有这些特点: 1. 在大多数情况下,你只需要安装MySQL-server和MySQL-client安装包就 ...

  5. centos7切换root为mysql,CentOS 7中使用rpm方式安装MySQL 5.7后无法使用root登录解决

    最近在CentOS 7中通过rpm方式安装了最新版本的mysql-server 5.7 (mysql57-community-release-el7-7.noarch.rpm) ,发现安装成功后无法使 ...

  6. CentOS 6 rpm方式安装mysql

    这里以mysql5.5为例,版本其实没什么特殊的要求 一.卸载CentOS自带的mysql 如果之前安装过,或者没有卸载CentOS自带的mysql 1.查看安装的mysql [root@localh ...

  7. centos 6.7 mysql rpm_CentOS 6.7 下RPM方式安装MySQL 5.6

    1. 下载Linux对应的RPM包,如:CentOS6.7_64对应的RPM包,如下: [root@mysql ~]# ll 总用量 113808 -rw-------. 1 root root    ...

  8. linux mysql5.7.11_在Linux中以命令行方式安装 MySQL 5.7.11 for Linux Generic 二进制版本

    转至: http://www.cnblogs.com/cyberniuniu/p/5273961.html MySQL 目前的最新版本是 5.7.11,在 Linux 下提供特定发行版安装包(如 .r ...

  9. rpm安装mysql odbc_如何以rpm方式安装mysql odbc驱动

    我就废话不多说了,大家还是直接看代码吧~create or replace function aa1(a1 integer[],a2 bigint) returns void AS $$declare ...

  10. centos rpm安装mysql5.5_CentOS 5.5下RPM方式安装MySQL 5.5 详解

    #rpm –qa|grep –i mysql查看已安装的mysql版本 如果有已存在的mysql版本则删除 安装服务端和客户端,去Oracle官网下载: # rpm -ivh MySQL-serve ...

最新文章

  1. 安装Ubuntu 14.04后要做的5件事情
  2. 安装很久_快看啦!吊轨推拉门安装图解在这里。
  3. 将用户名保存至cookie中
  4. JPA学习(6)JPQL
  5. VS中安装DevExpress后在Winform的工具箱中不显示控件
  6. 数据结构---排序算法的总结
  7. ogg初始化mysql数据_利用OGG进行数据库表的初始化
  8. 泰坦以太(以太流论)第五稿 titan_ysl 2020.02.04
  9. 九爷带你了解 深入理解 Memcache 原理
  10. Java各种学习资源(视频+文档)
  11. python一个月工资多少钱_Python工资一般是多少 看完吓你一跳【python教程是什么】...
  12. linux系统宝塔安装nodejs,基于debian宝塔面板安装nodebb – 一款基于Node.js的论坛程序...
  13. 使用腾讯云开发者平台免费搭载静态云服务
  14. springboot自带的线程池ThreadPoolTaskExecutor、ThreadPoolTaskScheduler的深入应用——异步任务监听回调,任务中断案例
  15. 开发者收到“加料”的假 Offer,害上家被盗近 6.25 亿美元!
  16. tensor如何实现转置_pytorch tensor 变换
  17. OpenCV+Python识别车牌和字符分割
  18. Compiling C
  19. 【实用工具】支持免费批量修改文件名称、格式、大小以及属性
  20. 如何防止身份证复印件被盗用

热门文章

  1. IOS设计模式之四(备忘录模式,命令模式)
  2. 第四章 分治策略 4.1 最大子数组问题 (暴力求解算法)
  3. SQL查询语句精华文章(转)
  4. Swift之深入解析“属性”的底层原理
  5. Matrix Studio LeetCode 刷题指南
  6. 13.2.10 Ajax操作
  7. 2013年第四届蓝桥杯C/C++ A组国赛 —— 第一题:填算式
  8. 1027:输出浮点数
  9. 【机器视觉】 if算子
  10. 【Qt】DOM读取XML文档