一.查看系统中有没有mysql的源

yum repolist all | grep mysql

  

二.配置源

1.配置源
参考mysql官方给出的源配置,https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/

新建文件

#/etc/yum.repos.d/mysql-community.repo
# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

  

2.配置key

新建/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql文件
从https://dev.mysql.com/doc/refman/5.6/en/checking-gpg-signature.html复制key过去

三.安装

1.再次查看源

yum repolist all | grep mysql

  

2.安装

yum install mysql-community-server

  

3.启动

service mysqld restart

  

4.重置默认密码

mysql -u root -p

mysql>use mysql;
mysql>UPDATE user SET Password=PASSWORD('newpwd') where USER='root';
mysql>FLUSH PRIVILEGES;

  

编译安装请参考:http://www.cnblogs.com/itfenqing/p/6054860.html

最新文章

  1. 深入理解javascript原型和闭包(1)——一切都是对象
  2. 初涉java库--ArrayList
  3. XmlDocument解析Soap格式文件案例:
  4. Python中如何读取xls中的数据
  5. UIkit框架之UIcollection
  6. centos 截图命令 screenshot
  7. debugging tools
  8. AAABBBBCCCC
  9. xbmc
  10. bzoj3573[Hnoi2014]米特运输
  11. Ubuntu与Ubuntu系统之间的mount挂载
  12. 值传递 & 引用传递
  13. ThinkPadT440 Ubuntu14.04 RTL8192EE 链接无线网
  14. sql中select语句的逻辑执行顺序
  15. jmeter利用自身代理录制电脑脚本(一)
  16. python_unittest学习小结
  17. 将一个JSON数组[{},{},{}]按一定规则合并到另一个JSON数组[{},{},{}]
  18. 35 个最好用的 Vue 开源库
  19. MySQL Session--批量KILL会话
  20. Site.ForProductsOfApple

热门文章

  1. Springboot+Redis序列化坑
  2. 快来看看Google出品的Protocol Buffer,别只会用Json和XML了
  3. 经典js框架
  4. JS 问题整理 (1)
  5. vue 项目 webstrom IDE格式化代码规则遵循eslint设置
  6. zlib编译不过(Error A2070)解决方法(转)
  7. linux select函数详解【转】
  8. python delete数据
  9. hdu 5084(矩阵操作)
  10. 第十四届华中科技大学程序设计竞赛 C Professional Manager【并查集删除/虚点】