chore: 升级MySQL版本到8.1.0

This commit is contained in:
xuwei-fit2cloud 2023-10-26 15:36:09 +08:00
parent ef392b69a4
commit 6c3153a827
3 changed files with 17 additions and 3 deletions

View File

@ -2,7 +2,7 @@ version: '2.1'
services: services:
mysql: mysql:
image: registry.cn-qingdao.aliyuncs.com/dataease/mysql:5.7.43 image: registry.cn-qingdao.aliyuncs.com/dataease/mysql:8.1.0
container_name: mysql container_name: mysql
healthcheck: healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u${DE_MYSQL_USER}", "-p${DE_MYSQL_PASSWORD}"] test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u${DE_MYSQL_USER}", "-p${DE_MYSQL_PASSWORD}"]

View File

@ -30,7 +30,7 @@ DE_MYSQL_USER=root
## 数据库密码 ## 数据库密码
DE_MYSQL_PASSWORD=Password123@mysql DE_MYSQL_PASSWORD=Password123@mysql
## 数据库参数 ## 数据库参数
DE_MYSQL_PARAMS="autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false" DE_MYSQL_PARAMS="autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true"
# Apache Doris 配置 # Apache Doris 配置
## 是否使用外部 Apache Doris ## 是否使用外部 Apache Doris

View File

@ -123,12 +123,22 @@ keep_doris="false"
if [[ -f ${DE_RUN_BASE}/docker-compose-doris.yml ]]; then if [[ -f ${DE_RUN_BASE}/docker-compose-doris.yml ]]; then
current_doris_version=$(grep '^ image:' ${DE_RUN_BASE}/docker-compose-doris.yml | head -1 | cut -d ':' -f3) current_doris_version=$(grep '^ image:' ${DE_RUN_BASE}/docker-compose-doris.yml | head -1 | cut -d ':' -f3)
if [[ ! $current_doris_version =~ "v1.2.4" ]]; then if [[ ! $current_doris_version =~ "v1.2.4" ]]; then
echo "不升级doris备份 docker-compose-doris.yml 文件" echo "不升级doris备份 docker-compose-doris.yml 文件" | tee -a ${CURRENT_DIR}/install.log
keep_doris="true" keep_doris="true"
\cp ${DE_RUN_BASE}/docker-compose-doris.yml ${DE_RUN_BASE}/docker-compose-doris.yml.bak \cp ${DE_RUN_BASE}/docker-compose-doris.yml ${DE_RUN_BASE}/docker-compose-doris.yml.bak
fi fi
fi fi
keep_mysql="false"
if [[ -f ${DE_RUN_BASE}/docker-compose-mysql.yml ]]; then
current_mysql_version=$(grep '^ image:' ${DE_RUN_BASE}/docker-compose-mysql.yml | head -1 | cut -d ':' -f3)
if [[ ! $current_mysql_version =~ "8." ]]; then
echo "不升级MySQL备份 docker-compose-mysql.yml 文件" | tee -a ${CURRENT_DIR}/install.log
keep_mysql="true"
\cp ${DE_RUN_BASE}/docker-compose-mysql.yml ${DE_RUN_BASE}/docker-compose-mysql.yml.bak
fi
fi
mkdir -p ${DE_RUN_BASE} mkdir -p ${DE_RUN_BASE}
@ -156,6 +166,10 @@ if [ ${keep_doris} = "true" ]; then
\mv ${DE_RUN_BASE}/docker-compose-doris.yml.bak ${DE_RUN_BASE}/docker-compose-doris.yml \mv ${DE_RUN_BASE}/docker-compose-doris.yml.bak ${DE_RUN_BASE}/docker-compose-doris.yml
fi fi
if [ ${keep_mysql} = "true" ]; then
\mv ${DE_RUN_BASE}/docker-compose-mysql.yml.bak ${DE_RUN_BASE}/docker-compose-mysql.yml
fi
DE_MYSQL_HOST_ORIGIN=$DE_MYSQL_HOST DE_MYSQL_HOST_ORIGIN=$DE_MYSQL_HOST
DE_MYSQL_PORT_ORIGIN=$DE_MYSQL_PORT DE_MYSQL_PORT_ORIGIN=$DE_MYSQL_PORT