feat: Support MySQL v8.4.2 (#1934)
This commit is contained in:
parent
d5a1731c97
commit
690ccead0e
|
|
@ -0,0 +1,13 @@
|
||||||
|
[mysqld]
|
||||||
|
host-cache-size=0
|
||||||
|
skip-name-resolve
|
||||||
|
datadir=/var/lib/mysql
|
||||||
|
socket=/var/run/mysqld/mysqld.sock
|
||||||
|
secure-file-priv=/var/lib/mysql-files
|
||||||
|
user=mysql
|
||||||
|
|
||||||
|
pid-file=/var/run/mysqld/mysqld.pid
|
||||||
|
[client]
|
||||||
|
socket=/var/run/mysqld/mysqld.sock
|
||||||
|
|
||||||
|
!includedir /etc/mysql/conf.d/
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
additionalProperties:
|
||||||
|
formFields:
|
||||||
|
- default: mysql
|
||||||
|
envKey: PANEL_DB_ROOT_PASSWORD
|
||||||
|
labelEn: Root Password
|
||||||
|
labelZh: root用户密码
|
||||||
|
random: true
|
||||||
|
required: true
|
||||||
|
rule: paramComplexity
|
||||||
|
type: password
|
||||||
|
- default: 3306
|
||||||
|
envKey: PANEL_APP_PORT_HTTP
|
||||||
|
labelEn: Port
|
||||||
|
labelZh: 端口
|
||||||
|
required: true
|
||||||
|
rule: paramPort
|
||||||
|
type: number
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:8.4.2
|
||||||
|
container_name: ${CONTAINER_NAME}
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: ${PANEL_DB_ROOT_PASSWORD}
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
ports:
|
||||||
|
- ${PANEL_APP_PORT_HTTP}:3306
|
||||||
|
volumes:
|
||||||
|
- ./data/:/var/lib/mysql
|
||||||
|
- ./conf/my.cnf:/etc/my.cnf
|
||||||
|
- ./log:/var/log/mysql
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
labels:
|
||||||
|
createdBy: "Apps"
|
||||||
|
command:
|
||||||
|
- --mysql-native-password=on
|
||||||
|
networks:
|
||||||
|
1panel-network:
|
||||||
|
external: true
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CONFIG_FILE="./conf/my.cnf"
|
||||||
|
|
||||||
|
if grep -q "skip-host-cache" "$CONFIG_FILE"; then
|
||||||
|
sed -i '/skip-host-cache/d' "$CONFIG_FILE"
|
||||||
|
else
|
||||||
|
echo "'skip-host-cache' does not exist in the configuration file."
|
||||||
|
fi
|
||||||
Loading…
Reference in New Issue