Merge pull request #716 from midoks/dev

修复bug(crontab)
pull/720/head
Mr Chen 1 month ago committed by GitHub
commit dd3f5fdb0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      plugins/mysql-community/conf/my8.0.cnf
  2. 2
      plugins/mysql-community/conf/my8.2.cnf
  3. 2
      plugins/mysql-community/conf/my8.3.cnf
  4. 2
      plugins/mysql-community/conf/my8.4.cnf
  5. 2
      plugins/mysql-community/conf/my9.0.cnf
  6. 2
      plugins/mysql-community/conf/my9.1.cnf
  7. 103
      plugins/mysql-community/conf/my9.2.cnf
  8. 2
      plugins/mysql-community/index.py
  9. 2
      plugins/mysql-community/info.json
  10. 83
      plugins/mysql-community/versions/9.2/install_generic.sh
  11. 2
      web/utils/crontab.py

@ -84,7 +84,7 @@ innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 1
innodb_write_io_threads = 1
innodb_file_per_table=1
binlog_expire_logs_seconds=2592000
binlog_expire_logs_seconds=604800
secure-file-priv={$SERVER_APP_PATH}/tmp

@ -83,7 +83,7 @@ innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 1
innodb_write_io_threads = 1
innodb_file_per_table=1
binlog_expire_logs_seconds=2592000
binlog_expire_logs_seconds=604800
secure-file-priv={$SERVER_APP_PATH}/tmp

@ -83,7 +83,7 @@ innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 1
innodb_write_io_threads = 1
innodb_file_per_table=1
binlog_expire_logs_seconds=2592000
binlog_expire_logs_seconds=604800
secure-file-priv={$SERVER_APP_PATH}/tmp

@ -83,7 +83,7 @@ innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 1
innodb_write_io_threads = 1
innodb_file_per_table=1
binlog_expire_logs_seconds=2592000
binlog_expire_logs_seconds=604800
secure-file-priv={$SERVER_APP_PATH}/tmp

@ -83,7 +83,7 @@ innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 1
innodb_write_io_threads = 1
innodb_file_per_table=1
binlog_expire_logs_seconds=2592000
binlog_expire_logs_seconds=604800
secure-file-priv={$SERVER_APP_PATH}/tmp

@ -83,7 +83,7 @@ innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 1
innodb_write_io_threads = 1
innodb_file_per_table=1
binlog_expire_logs_seconds=2592000
binlog_expire_logs_seconds=604800
secure-file-priv={$SERVER_APP_PATH}/tmp

@ -0,0 +1,103 @@
[client]
user = root
#password = your_password
port = 33206
socket = {$SERVER_APP_PATH}/mysql.sock
default-character-set = UTF8MB4
[mysqld]
!include {$SERVER_APP_PATH}/etc/mode/classic.cnf
authentication_policy=caching_sha2_password
pid-file = {$SERVER_APP_PATH}/data/mysql.pid
user = mysql
port = 33206
mysqlx_port = 33260
socket = {$SERVER_APP_PATH}/mysql.sock
datadir = {$SERVER_APP_PATH}/data
log-error = {$SERVER_APP_PATH}/data/error.log
server-id = {$SERVER_ID}
default_storage_engine = InnoDB
key_buffer_size = 8M
table_open_cache = 32
sort_buffer_size = 256K
net_buffer_length = 4K
read_buffer_size = 128K
read_rnd_buffer_size = 256K
myisam_sort_buffer_size = 4M
thread_cache_size = 4
lower_case_table_names=1
tmp_table_size = 8M
character-set-server = UTF8MB4
max_connections = 500
max_connect_errors = 100
open_files_limit = 2560
max_allowed_packet = 128M
#skip-external-locking
#skip-grant-tables
#loose-skip-innodb
#skip-networking
#skip-name-resolve
log-bin=mysql-bin
slow_query_log=1
slow-query-log-file={$SERVER_APP_PATH}/data/mysql-slow.log
long_query_time=3
#log_queries_not_using_indexes=on
relay-log=mdserver
relay-log-index=mdserver
#master
#sync_binlog=1
#binlog-do-db
binlog-ignore-db = test
binlog-ignore-db = mysql
binlog-ignore-db = information_schema
binlog-ignore-db = performance_schema
#slave
log_replica_updates
#replicate-do-db
replica_skip_errors=1062,1396
replicate-ignore-db = information_schema
replicate-ignore-db = performance_schema
replicate-ignore-db = mysql
replicate-ignore-db = test
default_storage_engine = InnoDB
innodb_data_home_dir = {$SERVER_APP_PATH}/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = {$SERVER_APP_PATH}/data
innodb_buffer_pool_size = 16M
innodb_redo_log_capacity=10485760
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 120
innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 1
innodb_write_io_threads = 1
innodb_file_per_table=1
binlog_expire_logs_seconds=604800
secure-file-priv={$SERVER_APP_PATH}/tmp
[mysqldump]
quick
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout

@ -403,7 +403,7 @@ def getShowLogFile():
return tmp.groups()[0].strip()
def getMdb8Ver():
return ['8.0','8.1','8.2','8.3','8.4','9.0','9.1']
return ['8.0','8.1','8.2','8.3','8.4','9.0','9.1',"9.2"]
def pGetDbUser():
if mw.isAppleSystem():

@ -7,7 +7,7 @@
"type":"运行环境",
"ps":"一种关系数据库管理系统(极速安装)",
"todo_versions":["5.7","8.0"],
"versions":["5.7","8.0","8.2","8.3","8.4","9.0","9.1"],
"versions":["5.7","8.0","8.2","8.3","8.4","9.0","9.1","9.2"],
"shell":"install.sh",
"install_pre_inspection":true,
"uninstall_pre_inspection":true,

@ -0,0 +1,83 @@
# -*- coding: utf-8 -*-
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
export DEBIAN_FRONTEND=noninteractive
# https://downloads.mysql.com/archives/community/
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sysName=`uname`
myDir=${serverPath}/source/mysql-community
OS_ARCH=`arch`
MYSQL_VER=9.2.0
SUFFIX_NAME=${MYSQL_VER}-linux-glibc2.28-${OS_ARCH}
# cd /www/server/mdserver-web/plugins/mysql-community && bash install.sh install 9.2
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-community/index.py start 9.2
COMMUNITY_INSTALL()
{
########
mkdir -p $myDir
mkdir -p $serverPath/mysql-community
# Linux - Generic
# https://cdn.mysql.com/archives/mysql-9.2/mysql-8.4.2-linux-glibc2.28-x86_64.tar.xz
# https://cdn.mysql.com/Downloads/MySQL-9.2/mysql-${SUFFIX_NAME}.tar.xz
if [ ! -f ${myDir}/mysql-${SUFFIX_NAME}.tar.xz ];then
wget --no-check-certificate -O ${myDir}/mysql-${SUFFIX_NAME}.tar.xz https://cdn.mysql.com/Downloads/MySQL-9.2/mysql-${SUFFIX_NAME}.tar.xz
fi
if [ -d ${myDir} ];then
cd ${myDir} && tar -Jxf ${myDir}/mysql-${SUFFIX_NAME}.tar.xz
cp -rf ${myDir}/mysql-${SUFFIX_NAME}/* $serverPath/mysql-community
fi
# 测试时可关闭
rm -rf $myDir/mysql-${SUFFIX_NAME}
#######
}
COMMUNITY_UNINSTALL()
{
###
rm -rf $myDir/mysql-${SUFFIX_NAME}
# apt remove -y mysql-server
###
}
Install_mysql()
{
echo '正在安装脚本文件...'
COMMUNITY_INSTALL
if [ "$?" == "0" ];then
mkdir -p $serverPath/mysql-community
echo '9.2' > $serverPath/mysql-community/version.pl
echo '安装完成'
else
echo '9.2' > $serverPath/mysql-community/version.pl
echo "暂时不支持该系统"
fi
}
Uninstall_mysql()
{
COMMUNITY_UNINSTALL
rm -rf $serverPath/mysql-community
echo '卸载完成'
}
action=$1
if [ "${1}" == 'install' ];then
Install_mysql
else
Uninstall_mysql
fi

@ -159,7 +159,7 @@ class crontab(object):
cron_path = mw.getServerDir() + '/cron'
cron_shell = self.getShell(data)
cmd += ' ' + cron_path + '/' + cron_name + ' >> ' + cron_path + '/' + cron_name + '.log 2>&1'
cmd += ' ' + cron_path + '/' + cron_shell + ' >> ' + cron_path + '/' + cron_shell + '.log 2>&1'
if not mw.isAppleSystem():
sh_data = self.writeShell(cmd)

Loading…
Cancel
Save