Centos6.5在線安裝mysql 8.0的順序如下,希望大家可以順利進行安裝。
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 |
驗證正確的subrepositories已啟用和禁用通過運行以下命令來檢查它的輸出(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
啟動Mysql服務
1
|
service mysqld start |
查看MySQL服務器的狀態(tài)
1
|
service mysqld status |
設置開機啟動
1
|
chkconfig mysqld on |
生成隨機密碼
1
|
grep 'temporary password' /var/log/mysqld.log |
重新登陸
1
2
|
mysql -uroot -p b/xE8hdZoEwJ |
配置Mysql 密碼以及權限
1
|
ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'Report@123' ; |
允許root用戶在任何地方進行遠程登錄,并具有所有庫任何操作權限
[code]GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Report@123' WITH GRANT OPTION;
FLUSH PRIVILEGES;
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持服務器之家。