国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當(dāng)前位置: 首頁 > news >正文

可以找酒店案例的網(wǎng)站網(wǎng)站流量排名

可以找酒店案例的網(wǎng)站,網(wǎng)站流量排名,web開發(fā)軟件,上海有哪些軟件公司一、鏡像下載 1、在線下載 在一臺能連外網(wǎng)的linux上執(zhí)行docker鏡像拉取命令 docker pull mysql:8.0.41 2、離線包下載 兩種方式: 方式一: -)在一臺能連外網(wǎng)的linux上安裝docker執(zhí)行第一步的命令下載鏡像 -)導(dǎo)出 # 導(dǎo)出鏡…

一、鏡像下載

1、在線下載

在一臺能連外網(wǎng)的linux上執(zhí)行docker鏡像拉取命令

docker pull mysql:8.0.41

2、離線包下載

兩種方式:

方式一:

-)在一臺能連外網(wǎng)的linux上安裝docker執(zhí)行第一步的命令下載鏡像

-)導(dǎo)出

# 導(dǎo)出鏡像到本地當(dāng)前目錄
docker save -o mysql-8.0.41.tar mysql:8.0.41

方式二:

-)Window桌面程序:Docker Desktop

-)下載鏡像

-)安裝鏡像導(dǎo)出插件

-)將鏡像文件保存到window本地(圖略)

3、Oracle Container Registry

Home

4、官方安裝程序下載

不是docker鏡像

https://dev.mysql.com/downloads/mysql/

二、安裝

1、在線安裝

見離線安裝(只比離線安裝少一步導(dǎo)入動作)

2、離線安裝

-)導(dǎo)入鏡像

docker load -i mysql_8_0_38.tar

-)查看鏡像

[docker@GZ***-PM153160 mysql]$ docker images
REPOSITORY                                 TAG       IMAGE ID       CREATED        SIZE
mysql                                      8.0.38    6c54cbcf775a   6 months ago   572MB、

-)創(chuàng)建映射目錄

創(chuàng)建mysql配置文件目錄、數(shù)據(jù)文件目錄,并修改目錄權(quán)限

sudo mkdir -p /opt/mysql/docker-mysql/conf
sudo mkdir -p /data1/mysql/docker-mysql/data
sudo chown -R docker.docker /opt/mysql
sudo chown -R docker.docker /data1

-)啟動容器

docker run -d \
-p 3307:3306 \
-v /opt/mysql/docker-mysql/conf:/etc/mysql/conf.d \
-v /data1/mysql/docker-mysql/data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=F1c1X****** \
--name mysql8.0.38 \
--restart=always \
mysql:8.0.38

-)查看容器

[docker@GZCRM-PM153160 mysql]$ docker ps
CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS          PORTS                                                    NAMES
48ea6d74fc20   mysql:8.0.38   "docker-entrypoint.s…"   11 minutes ago   Up 11 minutes   33060/tcp, 0.0.0.0:3307->3306/tcp, [::]:3307->3306/tcp   mysql8.0.38

-)從容器內(nèi)部拷貝配置文件

這一步和下一步可跳過(如果嫌麻煩),如果需要添加時區(qū)配置,可簡單在容器中修改配置文件

[docker@GZ***-PM153160 ~]$ docker cp 48ea6d74fc20:/etc/my.cnf /opt/mysql/docker-mysql/conf/my.cnf
Successfully copied 3.07kB to /opt/mysql/docker-mysql/conf/my.cnf

-)添加時區(qū)配置(中國大陸)

vi /opt/mysql/docker-mysql/conf/my.cnf?

default-time-zone='+08:00'

-)重啟容器

[docker@GZ***-PM153160 ~]$ docker restart 48ea6d74fc20
48ea6d74fc20

三、使用/基本操作

-)進入容器

[docker@GZ***-PM153160 ~]$ docker exec -it 48ea6d74fc20 /bin/bash
bash-5.1# 
bash-5.1# 

-)命令登陸mysql

[docker@GZ***-PM153160 ~]$ docker exec -it 48ea6d74fc20 /bin/bash
bash-5.1# 
bash-5.1# 
bash-5.1# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.38 MySQL Community Server - GPLCopyright (c) 2000, 2024, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> 
mysql> 

-)創(chuàng)建數(shù)據(jù)庫

mysql> CREATE DATABASE nacos;
Query OK, 1 row affected (0.00 sec)

-)創(chuàng)建用戶

# 同時指定密碼
CREATE USER 'nacos'@'%' IDENTIFIED BY '#!FlGO****';

-)授權(quán)

mysql> GRANT ALL PRIVILEGES ON nacos.* TO 'nacos'@'%';
Query OK, 0 rows affected (0.01 sec)mysql> 
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

遇到的問題總結(jié)

1、將鏡像推到內(nèi)網(wǎng)鏡像倉庫時報錯

[zhao****@GZ***-PM153160 ~]$ docker push 10.130.***.106:30089/library/zookeeper:3.9.3
The push refers to repository [10.130.153.***:30089/library/zookeeper]
Get "https://10.130.153.***:30089/v2/": x509: cannot validate certificate for 10.130.153.*** because it doesn't contain any IP SANs

?解決:換成域名

[zhao***@GZ***-PM153160 ~]$ docker login harbor.***.com:30089
Username: admin
Password: 
WARNING! Your password will be stored unencrypted in /home/zhaozheng/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credential-storesLogin Succeeded

可能會用到的其他命令

-)創(chuàng)建卷

docker volume create mysql_data

-)驗證卷

docker volume ls

-)使用卷

docker run --name some-mysql -v mysql_data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag

?這種docker卷作者沒有用過,有興趣的可自行嘗試~

如果喜歡我的文章,請幫我點贊,謝謝~??

http://aloenet.com.cn/news/42870.html

相關(guān)文章:

  • 茶的網(wǎng)站制作網(wǎng)站權(quán)重什么意思
  • 修改wordpress ftp端口廣州aso優(yōu)化
  • 培訓(xùn)學(xué)校 網(wǎng)站費用免費網(wǎng)站的軟件
  • WordPress快速發(fā)布文章濱州seo排名
  • 網(wǎng)站建設(shè)流行技術(shù)精準(zhǔn)客戶截流軟件
  • 專業(yè)做公司宣傳網(wǎng)站網(wǎng)站seo優(yōu)化步驟
  • 西安網(wǎng)站制作頂尖網(wǎng)站優(yōu)化要做哪些
  • 成都專業(yè)網(wǎng)站推廣公司百度推廣有哪些形式
  • 成都網(wǎng)站制作創(chuàng)新互聯(lián)微軟優(yōu)化大師
  • 天遠軟件網(wǎng)站建設(shè)百家號關(guān)鍵詞排名優(yōu)化
  • 建網(wǎng)站公司成都百度服務(wù)中心投訴
  • 網(wǎng)站怎么做友情鏈接深圳關(guān)鍵詞排名推廣
  • 做網(wǎng)站簡單嗎百度后臺管理
  • 安徽省建設(shè)廳網(wǎng)站證書查詢跨境網(wǎng)站建站
  • 做商城網(wǎng)站要什么手續(xù)百度公司簡介
  • 趣聞網(wǎng)站如何做建設(shè)網(wǎng)站流程
  • 網(wǎng)站背景怎么設(shè)置seo教學(xué)視頻教程
  • 如何制作和設(shè)計公司網(wǎng)站seo關(guān)鍵詞排名教程
  • 晉江網(wǎng)站有什么職業(yè)做百度網(wǎng)站站長工具
  • 系統(tǒng)開發(fā)費用seo模擬點擊算法
  • 淘寶做網(wǎng)站費用5118營銷大數(shù)據(jù)
  • 網(wǎng)站開發(fā)與移動互聯(lián)seo和競價排名的區(qū)別
  • 有做喜糖的網(wǎng)站嗎網(wǎng)絡(luò)工程師
  • 購物網(wǎng)站難做嗎網(wǎng)站優(yōu)化關(guān)鍵詞價格
  • 微信公眾號排版appseo的收費標(biāo)準(zhǔn)
  • 做網(wǎng)站基本費用大概需要多少sem專員
  • 做app和網(wǎng)站哪個比較好用免費推廣有哪些
  • 怎么做網(wǎng)站編程web網(wǎng)頁
  • 手機應(yīng)用軟件開發(fā)seo在線教程
  • 鞋店網(wǎng)站建設(shè)方案石家莊市人民政府官網(wǎng)