在看来mysql5.7诸多改进介绍后,决定也安装一个试用下;本文将使用rpm的方式来安装。

环境:
OS: CentOS6.5 x86_64 最小化安装
MEM: 1G
CPU: 1

1. 本文连着上一篇安装GCC5.3之后,新版本的glibc环境需设置到全局环境

shell> strings /usr/lib64/libstdc++.so.6|grep GLIBCXX # 查看当前版本
shell> rm -f /usr/lib64/libstdc++.so.6
shell> ln -s /usr/local/lib64/libstdc++.so.6.0.21 /usr/lib64/libstdc++.so.6
shell> strings /usr/local/lib64/libstdc++.so.6.0|grep GLIBCXX # 查看当前版本

2. 更新yum源到最新

shell> yum update
# 下载mysql的yum仓库文件
shell> wget
# 安装mysql yum repo
shell> rpm -Uvh mysql57-community-release-el6-7.noarch.rpm
# 或: yum localinstall mysql57-community-release-el6-7.noarch.rpm
# 查看
shell> vim /etc/yum.repos.d/mysql-community.repo # 可以看到里面关于mysql的内容,确保mysql57的enable是打开的状态(1)

3. 安装mysql服务

shell> yum install mysql-community-server

# 完成后启动服务
shell> service mysqld start

# 启动后,查看安装后自动生成的密码
shell> grep "password" /var/log/mysqld.log
## 输出
2015-12-24T02:12:21.721431Z 1 [Note] A temporary password is generated for root@localhost: s8)9B9)!#iWJ
2015-12-24T02:12:25.495271Z 0 [Note] Execution of init_file '/var/lib/mysql/install-validate-password-plugin.lv0PNr.sql' started.
2015-12-24T02:12:25.506256Z 0 [Note] Execution of init_file '/var/lib/mysql/install-validate-password-plugin.lv0PNr.sql' ended.
2015-12-24T02:12:27.323654Z 0 [Note] Shutting down plugin 'sha256_password'
2015-12-24T02:12:27.323657Z 0 [Note] Shutting down plugin 'mysql_native_password'
2015-12-24T02:12:29.351753Z 2 [Note] Access denied for user 'UNKNOWN_MYSQL_USER'@'localhost' (using password: NO)

## 第一行“root@localhost:”后面的字符就是密码了,我们需要用它来设置我们自己的root登录密码
shell> mysql_secure_installation
## 输出
Securing the MySQL server deployment.

Enter password for user root: [请在这里输出自动生成的密码,如:s8)9B9)!#iWJ]
## 注:密码必须满足1)长度大于8;2)包含至少1个数字,1个大写字母,1个小写字母,1个非字母数字的符号;3)长度不得超过32位。
## 完成后还需要设置一些初始化的配置,请按照提示来做

# 以上步骤结束后,可以使用root用户登录mysql试试了
shell> mysql -u root -p

# mysql的配置文件所在目录
shell> find / -name my.cnf
## 输出
/etc/my.cnf

4. 更多配置请到my.cnf中修改

5. 其他

官方文档请查看:

http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html

centos6 yum安装最新版mysql5.7的更多相关文章

  1. Linux -- Centos6 yum安装相关问题与处理

    Centos6 yum安装相关问题与处理 由于要使用yum下载文件,突然yum下载不了想要的文件,想更换yum源,结果得重新安装yum 来自本人GitHub地址https://github.com/m ...

  2. centos6 yum 安装memcached

    centos6 yum 安装memcached - 像块石头 - 博客园http://www.cnblogs.com/rockee/archive/2012/08/01/2619160.html yu ...

  3. Centos6 yum安装openldap+phpldapadmin+TLS+双主配置

    原文地址:http://54im.com/openldap/centos-6-yum-install-openldap-phpldapadmin-tls-%E5%8F%8C%E4%B8%BB%E9%8 ...

  4. Centos6 yum安装nginx

    1.Centos6系统库中默认是没有nginx的rpn包的,所以我们需要先更新下rpm依赖库 (1):使用yum安装nginx,安装nginx库 rpm -Uvh http://nginx.org/p ...

  5. centos6 yum安装jdk1.8+

    一.环境Linux操作系统: centos6.9 安装jdk版本: jdk1.8+ 二.安装步骤1. 检查系统是否自带有jdk[root@VM_0_11_centos ~]# rpm -qa |gre ...

  6. CentOS-6 yum安装nginx php53 mysql55 搭建LNMP环境

    1.导入外部软件库 01.rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/epel-release-6-5.noa ...

  7. CentOS6 YUM安装MariaDB10.3.10

    1.先新增加一个MariaDB.repo vi /etc/yum.repos.d/MariaDB.repo [mariadb] name = MariaDB baseurl = http://mirr ...

  8. linux centos6 yum 安装lamp

    centos 6.5 1.yum安装和源代码编译在使用的时候没啥区别,但是安装的过程就大相径庭了,yum只需要3个命令就可以完成,源代码需要13个包,还得加压编译,步骤很麻烦,而且当做有时候会出错,源 ...

  9. centos6 yum 安装nginx 不成功解决办法

    转自  http://wlheihei.com/view/64 [root@51ou.com yum.repos.d]# yum install nginxLoaded plugins: fastes ...

随机推荐

  1. yum安装docker报 No package docker available错误

    解决方案: yum install epel-release 然后再安装 CentOS6 yum install http://mirrors.yun-idc.com/epel/6/i386/epel ...

  2. golang channel本质——共享内存

    channel是golang中很重要的概念,配合goroutine是golang能够方便实现并发编程的关键.channel其实就是传统语言的阻塞消息队列,可以用来做不同goroutine之间的消息传递 ...

  3. 管道与popen函数与重定向

    转自:http://www.tldp.org/LDP/lpg/node12.html Pipes the Easy Way! LIBRARY FUNCTION: popen(); PROTOTYPE: ...

  4. spring boot 学习(十四)SpringBoot+Redis+SpringSession缓存之实战

    SpringBoot + Redis +SpringSession 缓存之实战 前言 前几天,从师兄那儿了解到EhCache是进程内的缓存框架,虽然它已经提供了集群环境下的缓存同步策略,这种同步仍然需 ...

  5. navicat安装步骤

    Navicat安装

  6. BZOJ2590 [Usaco2012 Feb]Cow Coupons

    好吧...想了半天想错了...虽然知道是贪心... 我们每次找没有被买的两种价格最小的牛,比较a = 当前差价最大的 + 当前优惠券价格最小的牛与b = 当前非优惠券价格最小的牛 所以...我们要 先 ...

  7. linux shard virtual memory

  8. Keil 中文显示乱码解决办法

    在将代码文件转换成UTF-8之前还要把Keil的环境也设置成UTF-8的模式,方法是:“Edit”——〉“Configuration...”——〉“Encoding”,选择“Encode in UTF ...

  9. 参数 out

    function outtest(out jo: ISuperObject; out s: string):Boolean; begin //进入函数时 jo =nil ErrStr = '' Res ...

  10. DevExpress v18.1新版亮点——WPF篇(二)

    用户界面套包DevExpress v18.1日前终于正式发布,本站将以连载的形式为大家介绍各版本新增内容.本文将介绍了DevExpress WPF v18.1 的新功能,快来下载试用新版本!点击下载& ...