安装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