Centos6.5在線安裝mysql 8.0的順序如下,希望大家可以順利進(jìn)行安裝。
Mysql卸載從下往上順序
1
2
3
4
5
6
|
[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源
1
2
3
4
5
6
7
8
9
10
11
|
cd /etc/yum .repos.d/ vi mysql.repo # Enable to use MySQL 8.0 [mysql80-community] name=MySQL 8.0 Community Server baseurl=http: //repo .mysql.com /yum/mysql-8 .0-community /el/6/ $basearch/ enabled=1 gpgcheck=1 gpgkey= file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql |
驗(yàn)證正確的subrepositories已啟用和禁用通過(guò)運(yùn)行以下命令來(lái)檢查它的輸出(DNF啟用系統(tǒng),取代百勝在DNF的命令)
1
|
yum repolist enabled | grep mysql |
YUM安裝mysql
yum install -y mysql-community-common mysql-community-libs mysql-community-client mysql-community-server mysql-community-devel
啟動(dòng)Mysql服務(wù)
1
|
service mysqld start |
查看MySQL服務(wù)器的狀態(tài)
1
|
service mysqld status |
設(shè)置開(kāi)機(jī)啟動(dòng)
1
|
chkconfig mysqld on |
生成隨機(jī)密碼
1
|
grep 'temporary password' /var/log/mysqld.log |
重新登陸
1
2
|
mysql -uroot -p b/xE8hdZoEwJ |
配置Mysql 密碼以及權(quán)限
1
|
ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'Report@123' ; |
允許root用戶在任何地方進(jìn)行遠(yuǎn)程登錄,并具有所有庫(kù)任何操作權(quán)限
[code]GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Report@123' WITH GRANT OPTION;
FLUSH PRIVILEGES;
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持服務(wù)器之家。