Oracle Linux 6.5 RPM安装Mysql 5.7.11
安裝Oracle Liunx 6.5 開發(fā)包全部選擇上 不然后面安裝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服務(wù) ?
service mysqld start
查看MySQL服務(wù)器的狀態(tài)
service mysqld status
生成隨機(jī)密碼
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 ?系統(tǒng)隨機(jī)密碼
修改Mysql密碼–一定要滿足復(fù)雜性
mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘HanZheng.123’;
Query OK, 0 rows affected (0.00 sec)
重新登陸
mysql -uroot -p ?
HanZheng.123
轉(zhuǎn)載于:https://blog.51cto.com/hanzheng/1751283
總結(jié)
以上是生活随笔為你收集整理的Oracle Linux 6.5 RPM安装Mysql 5.7.11的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 7月19日实习日志
- 下一篇: HTML5——section,artic