CentOS7上搭建單機Mysql服務

2021-10-21 20:11:48 字數 1387 閱讀 5392

2、安裝步驟

# 解除安裝centos中預安裝的 mysql

rpm -qa|grep -i mariadb

rpm -e mariadb-libs-5.5.68-1.el7.x86_64 --nodeps

rpm -qa | grep -i mysql

rpm -e mysql-libs-5.1.71-1.el6.x86_64 --nodeps

# 上傳mysql的安裝包

scp e:mysql-8.0.23-1.el7.x86_64.rpm-bundle.tar [email protected]:/usr/local/

# 解壓到/usr/local/mysql目錄下

mkdir /usr/local/mysql

tar -zxvf mysql-8.0.23-1.el7.x86_64.rpm-bundle.tar -c /usr/local/mysql/

# 安裝

rpm -ivh mysql-community-common-8.0.23-1.el7.x86_64.rpm

rpm -ivh mysql-community-libs-8.0.23-1.el7.x86_64.rpm

rpm -ivh mysql-community-client-plugins-8.0.23-1.el7.x86_64.rpm

rpm -ivh mysql-community-client-8.0.23-1.el7.x86_64.rpm

rpm -ivh mysql-community-server-8.0.23-1.el7.x86_64.rpm

# mysql服務命令

systemctl start mysqld.service

systemctl status mysqld.service

systemctl stop mysqld.service

systemctl enable mysqld.service

systemctl restart mysqld.service

# 檢視root使用者初始化密碼

cat/

var/log/mysqld.log | grep password

# 啟動客戶端連線

mysql -u root -p password

# 修改root使用者密碼

alter user 'root'@'localhost' identified with mysql_native_password by '複雜密碼'

;# 修改mysql密碼安全等級為低,長度最小為4位

set global validate_password.policy=0;

set global validate_password.length=4;

CentOS 7搭建單機ElasticSearch

root localhost elasticstack rpm tree beat filebeat 7.8.0 x86 64.rpm elasticsearch 7.8.0 x86 64.rpm kibana 7.8.0 x86 64.rpm logstash 7.8.0.rpm 專案包間無依賴關...

CentOS 7 使用Docker搭建Mysql

沒有安裝的可以看這篇文章 centos 7安裝docker docker pull mysql docker images 可以看到我們拉取的映象 root bogon docker images repository tag image id created size mynginx latest...

centos7 上搭建mqtt服務

在centos上搭建mqtt服務,主要是用到mosquitto訊息 服務軟體 我的linux版本為centos7 1 安裝軟體 按照如下命令安裝 mkdir data cd data wget tar xzvf mosquitto 1.4.10.tar.gz 安裝c areas wget tar x...