Merge pull request #6376 from dataease/pr@dev_update_mysql8

chore: 升级MySQL版本到8.1.0
This commit is contained in:
xuwei-fit2cloud 2023-10-26 15:37:13 +08:00 committed by GitHub
commit 3e9d3a476f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View File

@ -2,7 +2,7 @@ version: '2.1'
services:
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
healthcheck:
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_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

View File

@ -123,12 +123,22 @@ keep_doris="false"
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)
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"
\cp ${DE_RUN_BASE}/docker-compose-doris.yml ${DE_RUN_BASE}/docker-compose-doris.yml.bak
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}
@ -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
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_PORT_ORIGIN=$DE_MYSQL_PORT