码迷,mamicode.com
首页 > 数据库 > 详细

Oracle Linux 6.5 RPM安装Mysql 5.7.11

时间:2016-03-16 01:50:43      阅读:243      评论:0      收藏:0      [点我收藏+]

标签:oracle linux 6.5 rpm安装mysql 5.7.11

安装Oracle Liunx 6.5 开发包全部选择上 不然后面安装Mysql报错
[root@localhost /]# cd /tool
[root@localhost tool]# tar -xvf mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar
查看原来安装的Mysql  
[root@localhost /]# 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
mysql-server-5.1.71-1.el6.x86_64
qt-mysql-4.6.2-26.el6_4.x86_64

Mysql卸载从下往上顺序
[root@localhost /]# rpm -e –nodeps qt-mysql-4.6.2-26.el6_4.x86_64
[root@localhost /]# rpm -e –nodeps mysql-server-5.1.71-1.el6.x86_64
[root@localhost /]# rpm -e –nodeps mysql-libs-5.1.71-1.el6.x86_64
[root@localhost /]# rpm -e –nodeps mysql-devel-5.1.71-1.el6.x86_64
[root@localhost /]# rpm -e –nodeps mysql-5.1.71-1.el6.x86_64
[root@localhost /]# rpm -qa | grep mysql

安装Mysql安装顺序安装
[root@localhost tool]#rpm -ivh mysql-community-common-5.7.11-1.el6.x86_64.rpm
[root@localhost tool]#rpm -ivh mysql-community-libs-5.7.11-1.el6.x86_64.rpm
[root@localhost tool]#rpm -ivh mysql-community-client-5.7.11-1.el6.x86_64.rpm
[root@localhost tool]#rpm -ivh mysql-community-server-5.7.11-1.el6.x86_64.rpm

启动Mysql服务  
service mysqld start

查看MySQL服务器的状态
service mysqld status

生成随机密码
grep ‘temporary password’ /var/log/mysqld.log
2016-03-15T06:21:17.557372Z 1 [Note] A temporary password is generated for root@localhost: b/xE8hdZoEwJ

登陆mysql  
mysql -uroot -p  
b/xE8hdZoEwJ  系统随机密码

修改Mysql密码–一定要满足复杂性
mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘HanZheng.123’;
Query OK, 0 rows affected (0.00 sec)

重新登陆
mysql -uroot -p  
HanZheng.123


本文出自 “为梦想奋斗” 博客,谢绝转载!

Oracle Linux 6.5 RPM安装Mysql 5.7.11

标签:oracle linux 6.5 rpm安装mysql 5.7.11

原文地址:http://hanzheng.blog.51cto.com/3080616/1751283

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!