https://hub.docker.com/r/zhangsean/yearning
https://cookiey.github.io/Yearning-document/
http://mysql-inception.github.io/inception-document/
docker run -d --name yearning -p 8000:8000 --restart always --privileged=true --user=root -e TZ='Asia/Shanghai' --ulimit nofile=262144:262144 -v /etc/localtime:/etc/localtime:ro -e SECRET_KEY='dbcjqheupqjsuwsm' -e MYSQL_USER='root' -e MYSQL_ADDR='172.18.124.123:3396' -e MYSQL_PASSWORD='WLLkdhZkSOjTLU0L' -e MYSQL_DB='yearning' -e IS_DOCKER='is_docker' yeelabs/yearning
docker exec -it yearning /bin/bash
Yearning SQL审核平台,基于Inception的整套sql审核平台解决方案
---sql: admin/0
-- --------------------------------------------------------
-- 主机: 120.77.172.151
-- 服务器版本: 8.0.34 - MySQL Community Server - GPL
-- 服务器操作系统: Linux
-- HeidiSQL 版本: 12.5.0.6720
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- 导出 yearning 的数据库结构
DROP DATABASE IF EXISTS `yearning`;
CREATE DATABASE IF NOT EXISTS `yearning` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `yearning`;
-- 导出 表 yearning.core_accounts 结构
DROP TABLE IF EXISTS `core_accounts`;
CREATE TABLE IF NOT EXISTS `core_accounts` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
`department` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`real_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`email` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_recorder` tinyint NOT NULL DEFAULT '2',
`query_password` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_idx` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_accounts 的数据:~1 rows (大约)
DELETE FROM `core_accounts`;
INSERT INTO `core_accounts` (`id`, `username`, `password`, `department`, `real_name`, `email`, `is_recorder`, `query_password`) VALUES
(1, 'admin', 'pbkdf2_sha256$120000$JYEQdTYx9pbH$TtPolcIsym8zEfIfqVHZiirM74Ouaf9aQf5P+10i+Bk=', 'DBA', '超级管理员', '', 0, '');
-- 导出 表 yearning.core_auto_tasks 结构
DROP TABLE IF EXISTS `core_auto_tasks`;
CREATE TABLE IF NOT EXISTS `core_auto_tasks` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`source` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`source_id` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
`data_base` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`table` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`tp` tinyint NOT NULL,
`affectrow` int DEFAULT NULL,
`status` tinyint DEFAULT NULL,
`task_id` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
`id_c` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `source_idx` (`source_id`),
KEY `task_idx` (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_auto_tasks 的数据:~0 rows (大约)
DELETE FROM `core_auto_tasks`;
-- 导出 表 yearning.core_data_sources 结构
DROP TABLE IF EXISTS `core_data_sources`;
CREATE TABLE IF NOT EXISTS `core_data_sources` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`id_c` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`source` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`ip` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
`port` int NOT NULL,
`username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
`is_query` tinyint NOT NULL,
`flow_id` int NOT NULL,
`source_id` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
`exclude_db_list` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
`insulate_word_list` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
`principal` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
`ca_file` longtext COLLATE utf8mb4_unicode_ci,
`cert` longtext COLLATE utf8mb4_unicode_ci,
`key_file` longtext COLLATE utf8mb4_unicode_ci,
`db_type` int NOT NULL,
`rule_id` int NOT NULL,
PRIMARY KEY (`id`),
KEY `source_idx` (`source_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_data_sources 的数据:~0 rows (大约)
DELETE FROM `core_data_sources`;
-- 导出 表 yearning.core_global_configurations 结构
DROP TABLE IF EXISTS `core_global_configurations`;
CREATE TABLE IF NOT EXISTS `core_global_configurations` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`authorization` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`ldap` json DEFAULT NULL,
`message` json DEFAULT NULL,
`other` json DEFAULT NULL,
`stmt` tinyint NOT NULL DEFAULT '0',
`audit_role` json DEFAULT NULL,
`board` longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_global_configurations 的数据:~1 rows (大约)
DELETE FROM `core_global_configurations`;
INSERT INTO `core_global_configurations` (`id`, `authorization`, `ldap`, `message`, `other`, `stmt`, `audit_role`, `board`) VALUES
(1, 'global', '{"sc": "", "map": "", "url": "", "type": "(&(objectClass=organizationalPerson)(sAMAccountName=%s))", "user": "", "ldaps": false, "password": "", "test_user": "", "test_password": ""}', '{"key": "", "ssl": false, "ding": false, "host": "", "mail": false, "port": 25, "user": "", "format": "", "to_user": "", "password": "", "web_hook": "", "push_type": false}', '{"idc": ["Aliyun", "AWS"], "limit": 1000, "query": false, "domain": "", "export": false, "register": false, "ex_query_time": 60}', 0, '{"IsOSC": false, "OSCExpr": "", "OscSize": 0, "DMLOrder": false, "DMLWhere": false, "DDLMaxKey": 5, "DMLSelect": false, "PRIRollBack": false, "MaxAffectRows": 1000, "DDLMaxKeyParts": 5, "DDLTablePrefix": "", "DMLTransaction": false, "SupportCharset": "", "AllowCreateView": false, "CheckIdentifier": false, "MaxTableNameLen": 10, "MustHaveColumns": "", "AllowSpecialType": false, "DDLIndexNameSpec": false, "DDLMaxCharLength": 10, "DDLMultiToCommit": false, "DMLInsertColumns": false, "DMLMaxInsertRows": 10, "MaxDDLAffectRows": 0, "SupportCollation": "", "DDLAllowPRINotInt": false, "DDLPrimaryKeyMust": false, "DMLAllowLimitSTMT": false, "DDLAllowColumnType": false, "DDLAllowMultiAlter": false, "DDLEnableDropTable": false, "DMLAllowInsertNull": false, "DDLCheckFloatDouble": false, "DDLEnableForeignKey": false, "DDLEnablePrimaryKey": false, "AllowCreatePartition": false, "DDLCheckTableComment": false, "DDLCheckColumnDefault": false, "DDLEnableDropDatabase": false, "DDlCheckColumnComment": false, "DDLCheckColumnNullable": false, "DDLEnableAutoIncrement": false, "DDLEnableNullIndexName": false, "DDLColumnsMustHaveIndex": "", "DDLEnableAcrossDBRename": false, "DMLInsertMustExplicitly": false, "DDLImplicitTypeConversion": false, "DDLEnableAutoincrementInit": false, "AllowCrateViewWithSelectStar": false, "DDLAllowChangeColumnPosition": false, "DDLEnableAutoincrementUnsigned": false}', '');
-- 导出 表 yearning.core_graineds 结构
DROP TABLE IF EXISTS `core_graineds`;
CREATE TABLE IF NOT EXISTS `core_graineds` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`group` json DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_idx` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_graineds 的数据:~1 rows (大约)
DELETE FROM `core_graineds`;
INSERT INTO `core_graineds` (`id`, `username`, `group`) VALUES
(1, 'admin', '["d2afdcea-4491-45b6-8730-e45acb59a8a8"]');
-- 导出 表 yearning.core_order_comments 结构
DROP TABLE IF EXISTS `core_order_comments`;
CREATE TABLE IF NOT EXISTS `core_order_comments` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`work_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`content` longtext COLLATE utf8mb4_unicode_ci,
`time` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `workId_idx` (`work_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_order_comments 的数据:~0 rows (大约)
DELETE FROM `core_order_comments`;
-- 导出 表 yearning.core_query_orders 结构
DROP TABLE IF EXISTS `core_query_orders`;
CREATE TABLE IF NOT EXISTS `core_query_orders` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`work_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`date` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`approval_time` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`text` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`assigned` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`real_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`export` tinyint NOT NULL,
`source_id` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
`status` tinyint NOT NULL,
PRIMARY KEY (`id`),
KEY `workId_idx` (`work_id`),
KEY `source_idx` (`source_id`),
KEY `status_idx` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_query_orders 的数据:~0 rows (大约)
DELETE FROM `core_query_orders`;
-- 导出 表 yearning.core_query_records 结构
DROP TABLE IF EXISTS `core_query_records`;
CREATE TABLE IF NOT EXISTS `core_query_records` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`work_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`sql` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`ex_time` int NOT NULL,
`time` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`source` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`schema` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `workId_idx` (`work_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_query_records 的数据:~0 rows (大约)
DELETE FROM `core_query_records`;
-- 导出 表 yearning.core_role_groups 结构
DROP TABLE IF EXISTS `core_role_groups`;
CREATE TABLE IF NOT EXISTS `core_role_groups` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`permissions` json DEFAULT NULL,
`group_id` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `group_idx` (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_role_groups 的数据:~1 rows (大约)
DELETE FROM `core_role_groups`;
INSERT INTO `core_role_groups` (`id`, `name`, `permissions`, `group_id`) VALUES
(1, 'admin', '{"ddl_source": [], "dml_source": [], "query_source": []}', 'd2afdcea-4491-45b6-8730-e45acb59a8a8');
-- 导出 表 yearning.core_rollbacks 结构
DROP TABLE IF EXISTS `core_rollbacks`;
CREATE TABLE IF NOT EXISTS `core_rollbacks` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`work_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`sql` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `workId_idx` (`work_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_rollbacks 的数据:~0 rows (大约)
DELETE FROM `core_rollbacks`;
-- 导出 表 yearning.core_rules 结构
DROP TABLE IF EXISTS `core_rules`;
CREATE TABLE IF NOT EXISTS `core_rules` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`desc` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`audit_role` json DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_rules 的数据:~0 rows (大约)
DELETE FROM `core_rules`;
-- 导出 表 yearning.core_sql_orders 结构
DROP TABLE IF EXISTS `core_sql_orders`;
CREATE TABLE IF NOT EXISTS `core_sql_orders` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`work_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`status` tinyint NOT NULL,
`type` tinyint NOT NULL,
`backup` tinyint NOT NULL,
`id_c` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`source` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`source_id` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
`data_base` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`table` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`date` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`sql` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`text` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`assigned` varchar(550) COLLATE utf8mb4_unicode_ci NOT NULL,
`delay` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'none',
`real_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`execute_time` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`current_step` int DEFAULT NULL,
`relevant` json DEFAULT NULL,
`osc_info` longtext COLLATE utf8mb4_unicode_ci,
`file` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `query_idx` (`username`),
KEY `source_idx` (`source_id`),
KEY `workId_idx` (`work_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_sql_orders 的数据:~0 rows (大约)
DELETE FROM `core_sql_orders`;
-- 导出 表 yearning.core_sql_records 结构
DROP TABLE IF EXISTS `core_sql_records`;
CREATE TABLE IF NOT EXISTS `core_sql_records` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`work_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`sql` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`state` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`affectrow` int NOT NULL,
`time` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`error` longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`id`),
KEY `workId_idx` (`work_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_sql_records 的数据:~0 rows (大约)
DELETE FROM `core_sql_records`;
-- 导出 表 yearning.core_total_tickets 结构
DROP TABLE IF EXISTS `core_total_tickets`;
CREATE TABLE IF NOT EXISTS `core_total_tickets` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`date` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`total_order` int NOT NULL,
`total_query` int NOT NULL,
PRIMARY KEY (`id`),
KEY `date_idx` (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_total_tickets 的数据:~0 rows (大约)
DELETE FROM `core_total_tickets`;
-- 导出 表 yearning.core_workflow_details 结构
DROP TABLE IF EXISTS `core_workflow_details`;
CREATE TABLE IF NOT EXISTS `core_workflow_details` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`work_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`time` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`action` varchar(550) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `workId_idx` (`work_id`),
KEY `query_idx` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_workflow_details 的数据:~0 rows (大约)
DELETE FROM `core_workflow_details`;
-- 导出 表 yearning.core_workflow_tpls 结构
DROP TABLE IF EXISTS `core_workflow_tpls`;
CREATE TABLE IF NOT EXISTS `core_workflow_tpls` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`source` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`steps` json DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `source_idx` (`source`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 正在导出表 yearning.core_workflow_tpls 的数据:~0 rows (大约)
DELETE FROM `core_workflow_tpls`;
/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
追梦赤子心:domsn.com
签名:这个人很懒,什么也没有留下!
收藏的用户(0)
X
正在加载信息~
最新回复 (0)