From 82580ec84c8423dea4aad2d14d864383407fbd5b Mon Sep 17 00:00:00 2001 From: wanghe Date: Mon, 3 Jul 2023 17:46:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=20MySQL=205.6=20(#17?= =?UTF-8?q?2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mysql/5.6.51/conf/my.cnf | 71 ++++++++++++++++++++++++++++ apps/mysql/5.6.51/data.yml | 17 +++++++ apps/mysql/5.6.51/docker-compose.yml | 27 +++++++++++ 3 files changed, 115 insertions(+) create mode 100644 apps/mysql/5.6.51/conf/my.cnf create mode 100755 apps/mysql/5.6.51/data.yml create mode 100644 apps/mysql/5.6.51/docker-compose.yml diff --git a/apps/mysql/5.6.51/conf/my.cnf b/apps/mysql/5.6.51/conf/my.cnf new file mode 100644 index 00000000..94804f84 --- /dev/null +++ b/apps/mysql/5.6.51/conf/my.cnf @@ -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/ \ No newline at end of file diff --git a/apps/mysql/5.6.51/data.yml b/apps/mysql/5.6.51/data.yml new file mode 100755 index 00000000..e71c6a38 --- /dev/null +++ b/apps/mysql/5.6.51/data.yml @@ -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 diff --git a/apps/mysql/5.6.51/docker-compose.yml b/apps/mysql/5.6.51/docker-compose.yml new file mode 100644 index 00000000..4a78d9eb --- /dev/null +++ b/apps/mysql/5.6.51/docker-compose.yml @@ -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 \ No newline at end of file