CentOS7離線安裝MySQL57

2021-10-09 08:16:31 字數 3211 閱讀 1862

mysql離線安裝包

安裝所需要的依賴

yum -y install numactl
解除安裝mariadb

[root@vm-0-

12-centos ~

]# rpm -qa|grep mariadb

mariadb-libs-

5.5.56

-2.el7.x86_64

[root@vm-0-

12-centos ~

]# rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64

[root@vm-0-

12-centos ~

]# rpm -qa|grep mariadb

安裝原生yum源(非必選)

安裝mysql rpm

如果出現以下錯誤

則在每個命令後加上–nodeps --force

rpm -ivh mysql-community-common-

5.7.28

-1.el7.x86_64.rpm -

-nodeps -

-force

rpm -ivh mysql-community-devel-

5.7.28

-1.el7.x86_64.rpm -

-nodeps -

-force

rpm -ivh mysql-community-libs-compat-

5.7.28

-1.el7.x86_64.rpm -

-nodeps -

-force

rpm -ivh mysql-community-libs-

5.7.28

-1.el7.x86_64.rpm -

-nodeps -

-force

rpm -ivh mysql-connector-odbc-

8.0.18

-1.el7.x86_64.rpm -

-nodeps -

-force

rpm -ivh mysql-community-client-

5.7.28

-1.el7.x86_64.rpm -

-nodeps -

-force

rpm -ivh mysql-community-server-

5.7.28

-1.el7.x86_64.rpm -

-nodeps -

-force

啟動mysql伺服器

service mysqld start
修改密碼mysql會預設給乙個初始密碼,需要修改

檢視初始密碼方式

cat /var/log/mysqld.log | grep password

2020-09

-10t07:01:

48.412701z 1

[note] a temporary password is generated for root@localhost: ghyo?n+e)

6*g

登陸mysql

mysql -u root -p
輸入初始密碼

因為mysql的密碼規則異常煩人,可以先修改mysql密碼規則

set

global validate_password_policy=0;

setglobal validate_password_mixed_case_count=0;

setglobal validate_password_special_char_count=0;

setglobal validate_password_length=

6;

修改密碼

alter user 'root'@'localhost' identified by '123456'

;

如果需要遠端鏈結

grant all privileges on *

.* to 'root'@'%' identified by '123456' with grant option;

CentOS7離線安裝Docker

安裝過程中遇到的問題 下面描述了如何在centos7離線安裝docker。建議先閱讀docker官方離線安裝指南 參考下面的文章將iso光碟印象檔案設定為本地yum源 在vmware中設定iso光碟映象為本地yum源 在上面的目錄下,執行 sudo yum install rpm因為前面已經設定了本...

centos7安裝離線ntp

autogen libopts 5.18 5.el7.x86 64.rpm ntpdate 4.2.6p5 28.el7.centos.x86 64.rpm ntp 4.2.6p5 28.el7.centos.x86 64.rpm cd 到存放安裝包的目錄執行如下3天命令 rpm ivh autog...

centos7離線安裝ansible

centos7離線安裝ansible 2 啟動ssh服務。3 收集金鑰檔案。示例 ssh keygen t rsa p 寫入信任檔案 將 root ssh id rsa storm1.pub分發到其他伺服器,並在所有伺服器上執行如下指令 cat root ssh id rsa storm1.pub ...