feat: 新增 MySQL 5.6 (#172)

This commit is contained in:
wanghe 2023-07-03 17:46:01 +08:00 committed by GitHub
parent 1fd96e4e65
commit 82580ec84c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 115 additions and 0 deletions

View File

@ -0,0 +1,71 @@
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# The MySQL Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
skip-host-cache
skip-name-resolve
datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
secure-file-priv=/var/lib/mysql-files
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
#log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
max_allowed_packet=64M
character_set_server=utf8
lower_case_table_names=1
group_concat_max_len=1024000
[client]
socket=/var/run/mysqld/mysqld.sock
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

17
apps/mysql/5.6.51/data.yml Executable file
View File

@ -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

View File

@ -0,0 +1,27 @@
version: '3'
services:
mysql:
image: mysql:5.6.51
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/mysql/my.cnf
- ./log:/var/log/mysql
command:
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true