diff --git a/dbm-services/common/db-config/assets/migrations/000019_tendbcluster_data.up.sql b/dbm-services/common/db-config/assets/migrations/000019_tendbcluster_data.up.sql index 7bf01f49b4..8e56eb037a 100644 --- a/dbm-services/common/db-config/assets/migrations/000019_tendbcluster_data.up.sql +++ b/dbm-services/common/db-config/assets/migrations/000019_tendbcluster_data.up.sql @@ -955,6 +955,7 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15016,'tendbcluster','dbconf','MySQL-8.0','mysqld.relay-log','STRING','{{.Mysqld.Datadir}}/relay-log/relay-log.bin',NULL,'',2,0,0,0,1,'{{mysqld.datadir}}/relay-log/relay-log.bin',NULL,NULL,-1,NULL,NULL,'2023-03-09 17:36:33','2023-03-28 18:00:36',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15017,'tendbcluster','dbconf','MySQL-8.0','mysqld.relay_log_recovery','INT','1','1 | 0','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-03-09 17:36:33','2023-04-19 15:10:13',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15019,'tendbcluster','dbconf','MySQL-8.0','mysqld.replicate-wild-ignore-table','STRING','mysql.%,infodba_schema.conn_log',NULL,'STRING',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-03-09 17:36:33','2023-04-19 15:12:54',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (23708,'tendbcluster','dbconf','MySQL-8.0','mysqld.secure_file_priv','STRING','\'\'','\'\'','ENUMS',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2023-04-19 11:29:17',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15022,'tendbcluster','dbconf','MySQL-8.0','mysqld.server_id','STRING','{{.Mysqld.ServerId}}',NULL,'',2,0,0,0,1,'{{mysqld.server_id}}',NULL,NULL,-1,NULL,NULL,'2023-03-09 17:36:33','2023-03-28 18:01:00',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15023,'tendbcluster','dbconf','MySQL-8.0','mysqld.session_track_gtids','STRING','OFF','OFF| OWN_GTID| ALL_GTIDS ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,'Whether the server tracks GTIDs within the current session and returns them to the client. ','2023-03-09 17:36:33','2023-03-09 17:36:33',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15024,'tendbcluster','dbconf','MySQL-8.0','mysqld.session_track_schema','STRING','ON','ON| OFF ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,'Whether the server tracks changes to the default schema (database) name within the current session and makes this information available to the client when changes occur.','2023-03-09 17:36:33','2023-03-09 17:36:33',0); @@ -1806,6 +1807,7 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18934,'tendbcluster','dbconf','TXSQL-8.0','mysqld.relay-log','STRING','{{.Mysqld.Datadir}}/relay-log/relay-log.bin',NULL,'',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:20:26','2023-11-14 15:20:26',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18935,'tendbcluster','dbconf','TXSQL-8.0','mysqld.relay_log_recovery','INT','1','1 | 0','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:20:26','2023-11-14 15:20:26',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18936,'tendbcluster','dbconf','TXSQL-8.0','mysqld.replicate-wild-ignore-table','STRING','mysql.%,infodba_schema.conn_log',NULL,'STRING',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:20:26','2023-11-14 15:20:26',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (23709,'tendbcluster','dbconf','TXSQL-8.0','mysqld.secure_file_priv','STRING','\'\'','\'\'','ENUMS',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2023-04-19 11:29:17',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18937,'tendbcluster','dbconf','TXSQL-8.0','mysqld.server_id','STRING','{{.Mysqld.ServerId}}',NULL,'',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:20:26','2023-11-14 15:20:26',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18938,'tendbcluster','dbconf','TXSQL-8.0','mysqld.session_track_gtids','STRING','OFF','OFF| OWN_GTID| ALL_GTIDS ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,'Whether the server tracks GTIDs within the current session and returns them to the client. ','2023-11-14 15:20:26','2023-11-14 15:20:26',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18939,'tendbcluster','dbconf','TXSQL-8.0','mysqld.session_track_schema','STRING','ON','ON| OFF ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,'Whether the server tracks changes to the default schema (database) name within the current session and makes this information available to the client when changes occur.','2023-11-14 15:20:26','2023-11-14 15:20:26',0); diff --git a/dbm-services/common/db-config/assets/migrations/000020_tendbha_data.up.sql b/dbm-services/common/db-config/assets/migrations/000020_tendbha_data.up.sql index fbc0e4a5e1..fc3bbda60a 100644 --- a/dbm-services/common/db-config/assets/migrations/000020_tendbha_data.up.sql +++ b/dbm-services/common/db-config/assets/migrations/000020_tendbha_data.up.sql @@ -960,6 +960,7 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (376,'tendbha','dbconf','MySQL-8.0','mysqld.relay-log','STRING','{{.Mysqld.Datadir}}/relay-log/relay-log.bin',NULL,'',2,0,0,0,1,'{{mysqld.datadir}}/relay-log/relay-log.bin',NULL,NULL,-1,NULL,NULL,'2022-04-25 10:00:47','2023-03-28 18:00:36',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (377,'tendbha','dbconf','MySQL-8.0','mysqld.relay_log_recovery','INT','1','1 | 0','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-04-25 10:00:47','2023-04-19 15:10:13',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (379,'tendbha','dbconf','MySQL-8.0','mysqld.replicate-wild-ignore-table','STRING','mysql.%,infodba_schema.conn_log',NULL,'STRING',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-04-25 10:00:47','2023-04-19 15:12:54',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (23707,'tendbha','dbconf','MySQL-8.0','mysqld.secure_file_priv','STRING','\'\'','\'\'','ENUMS',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2023-04-19 11:29:17',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (383,'tendbha','dbconf','MySQL-8.0','mysqld.server_id','STRING','{{.Mysqld.ServerId}}',NULL,'',2,0,0,0,1,'{{mysqld.server_id}}',NULL,NULL,-1,NULL,NULL,'2022-04-25 10:00:47','2023-03-28 18:01:00',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (4975,'tendbha','dbconf','MySQL-8.0','mysqld.session_track_gtids','STRING','OFF','OFF| OWN_GTID| ALL_GTIDS ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,'Whether the server tracks GTIDs within the current session and returns them to the client. ','2022-06-16 21:39:26','2022-10-20 12:26:09',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (4976,'tendbha','dbconf','MySQL-8.0','mysqld.session_track_schema','STRING','ON','ON| OFF ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,'Whether the server tracks changes to the default schema (database) name within the current session and makes this information available to the client when changes occur.','2022-06-16 21:39:26','2022-10-20 12:26:09',0); @@ -1206,6 +1207,7 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18425,'tendbha','dbconf','TXSQL-8.0','mysqld.relay-log','STRING','{{.Mysqld.Datadir}}/relay-log/relay-log.bin',NULL,'',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:18:34','2023-11-14 15:18:34',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18426,'tendbha','dbconf','TXSQL-8.0','mysqld.relay_log_recovery','INT','1','1 | 0','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:18:34','2023-11-14 15:18:34',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18427,'tendbha','dbconf','TXSQL-8.0','mysqld.replicate-wild-ignore-table','STRING','mysql.%,infodba_schema.conn_log',NULL,'STRING',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:18:34','2023-11-14 15:18:34',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (23710,'tendbha','dbconf','TXSQL-8.0','mysqld.secure_file_priv','STRING','\'\'','\'\'','ENUMS',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2023-04-19 11:29:17',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18428,'tendbha','dbconf','TXSQL-8.0','mysqld.server_id','STRING','{{.Mysqld.ServerId}}',NULL,'',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:18:34','2023-11-14 15:18:34',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18429,'tendbha','dbconf','TXSQL-8.0','mysqld.session_track_gtids','STRING','OFF','OFF| OWN_GTID| ALL_GTIDS ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,'Whether the server tracks GTIDs within the current session and returns them to the client. ','2023-11-14 15:18:34','2023-11-14 15:18:34',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18430,'tendbha','dbconf','TXSQL-8.0','mysqld.session_track_schema','STRING','ON','ON| OFF ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,'Whether the server tracks changes to the default schema (database) name within the current session and makes this information available to the client when changes occur.','2023-11-14 15:18:34','2023-11-14 15:18:34',0); diff --git a/dbm-services/common/db-config/assets/migrations/000021_tendbsingle_data.up.sql b/dbm-services/common/db-config/assets/migrations/000021_tendbsingle_data.up.sql index 2473936c95..65a152c29d 100644 --- a/dbm-services/common/db-config/assets/migrations/000021_tendbsingle_data.up.sql +++ b/dbm-services/common/db-config/assets/migrations/000021_tendbsingle_data.up.sql @@ -926,6 +926,7 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (10329,'tendbsingle','dbconf','MySQL-8.0','mysqld.read_rnd_buffer_size','INT','524288','[1,2147483647]','RANGE',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2022-10-20 12:26:09',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (10330,'tendbsingle','dbconf','MySQL-8.0','mysqld.relay-log','STRING','{{.Mysqld.Datadir}}/relay-log/relay-log.bin',NULL,'',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2023-03-28 18:00:36',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (10331,'tendbsingle','dbconf','MySQL-8.0','mysqld.relay_log_recovery','INT','1','1 | 0','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2023-04-19 15:10:13',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (23706,'tendbsingle','dbconf','MySQL-8.0','mysqld.secure_file_priv','STRING','\'\'','\'\'','ENUMS',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2023-04-19 11:29:17',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (10337,'tendbsingle','dbconf','MySQL-8.0','mysqld.server_id','STRING','{{.Mysqld.ServerId}}',NULL,'',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2023-03-28 18:01:00',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (10338,'tendbsingle','dbconf','MySQL-8.0','mysqld.session_track_gtids','STRING','OFF','OFF| OWN_GTID| ALL_GTIDS ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2022-10-20 12:26:09',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (10339,'tendbsingle','dbconf','MySQL-8.0','mysqld.session_track_schema','STRING','ON','ON| OFF ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2022-10-20 12:26:09',0); @@ -1169,6 +1170,7 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18677,'tendbsingle','dbconf','TXSQL-8.0','mysqld.read_rnd_buffer_size','INT','524288','[1,2147483647]','RANGE',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:20:18','2023-11-14 15:20:18',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18678,'tendbsingle','dbconf','TXSQL-8.0','mysqld.relay-log','STRING','{{.Mysqld.Datadir}}/relay-log/relay-log.bin',NULL,'',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:20:18','2023-11-14 15:20:18',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18679,'tendbsingle','dbconf','TXSQL-8.0','mysqld.relay_log_recovery','INT','1','1 | 0','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:20:18','2023-11-14 15:20:18',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (23711,'tendbsingle','dbconf','TXSQL-8.0','mysqld.secure_file_priv','STRING','\'\'','\'\'','ENUMS',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2022-09-26 18:11:34','2023-04-19 11:29:17',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18680,'tendbsingle','dbconf','TXSQL-8.0','mysqld.server_id','STRING','{{.Mysqld.ServerId}}',NULL,'',2,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:20:18','2023-11-14 15:20:18',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18681,'tendbsingle','dbconf','TXSQL-8.0','mysqld.session_track_gtids','STRING','OFF','OFF| OWN_GTID| ALL_GTIDS ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:20:18','2023-11-14 15:20:18',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18682,'tendbsingle','dbconf','TXSQL-8.0','mysqld.session_track_schema','STRING','ON','ON| OFF ','ENUM',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-14 15:20:18','2023-11-14 15:20:18',0); diff --git a/dbm-services/common/db-config/cmd/bkconfigsvr/main.go b/dbm-services/common/db-config/cmd/bkconfigsvr/main.go index 7fdda62ad5..5dad3ae4d3 100644 --- a/dbm-services/common/db-config/cmd/bkconfigsvr/main.go +++ b/dbm-services/common/db-config/cmd/bkconfigsvr/main.go @@ -49,7 +49,7 @@ func main() { // process db migrate pflag.Parse() - if config.GetBool("migrate") || config.GetBool("migrate.enable") { + if config.GetBool("migrate") || config.GetBool("migrate.enable") || true { logger.Info("run db migrations...") if err := dbMigrate(); err != nil && err != migrate.ErrNoChange { log.Fatal(err) diff --git a/dbm-services/common/db-config/pkg/core/config/base.go b/dbm-services/common/db-config/pkg/core/config/base.go index 7a8750d0fd..d041655f8c 100644 --- a/dbm-services/common/db-config/pkg/core/config/base.go +++ b/dbm-services/common/db-config/pkg/core/config/base.go @@ -52,7 +52,6 @@ func InitConfig(fileName string) { viper.SetConfigType("yaml") viper.SetConfigName(fileName) viper.AutomaticEnv() // read in environment variables that match - // viper.SetEnvPrefix("ACCOUNT") replacer := strings.NewReplacer(".", "_") viper.SetEnvKeyReplacer(replacer) if err := viper.MergeInConfig(); err != nil { diff --git a/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/precheck/check_space.go b/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/precheck/check_space.go index e23979049d..1364d9c481 100644 --- a/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/precheck/check_space.go +++ b/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/precheck/check_space.go @@ -66,9 +66,11 @@ func CheckAndCleanDiskSpace(cnf *config.Public) error { if err != nil { return err } + // 第一次检查,空间满足直接通过 if _, err := util.CheckDiskSpace(cnf.BackupDir, cnf.MysqlPort, backupSize); err == nil { return nil } + // 删除旧备份后,第二次检查 if err := DeleteOldBackup(cnf, 0); err != nil { // 文件清理错误,只当做 warning logger.Log.Warn("failed to delete old backup again, err:", err) @@ -77,18 +79,21 @@ func CheckAndCleanDiskSpace(cnf *config.Public) error { if err == nil { return nil } else { - logger.Log.Warn("clean backup: %s", err.Error()) + logger.Log.Warnf("clean backup: %s", err.Error()) } if sizeLeft < 0 { - cleanBinlogCmd := []string{"rotatebinlog", "clean-space", "--max-disk-used-pct", "20"} + // 删除 binlog,第三次检查 + cleanBinlogCmd := []string{"./rotatebinlog", "clean-space", "--max-disk-used-pct", "20"} //"--size-to-free", cast.ToString(math.Abs(float64(sizeLeft))) logger.Log.Infof("clean binlog: %s", strings.Join(cleanBinlogCmd, " ")) // 如果备份全部清理完成,预测空间还不够备份,则请求清理 binlog - _, strErr, err := cmutil.ExecCommand(false, filepath.Join(cst.MysqlRotateBinlogInstallPath, "rotatebinlog"), + _, strErr, err := cmutil.ExecCommand(false, cst.MysqlRotateBinlogInstallPath, cleanBinlogCmd[0], cleanBinlogCmd[1:]...) if err != nil { logger.Log.Warnf("rotatebinlog clean-space failed: %s, %s", err.Error(), strErr) } + _, err = util.CheckDiskSpace(cnf.BackupDir, cnf.MysqlPort, backupSize) + return err } return nil } diff --git a/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/precheck/precheck.go b/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/precheck/precheck.go index 1d7cc8bb15..edac360b60 100644 --- a/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/precheck/precheck.go +++ b/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/precheck/precheck.go @@ -42,8 +42,8 @@ func CheckBackupType(cnf *config.BackupConfig) error { if cnf.Public.BackupType == cst.BackupTypeAuto { // report 时需要用真实的 backup type if backupSize > cst.BackupTypeAutoDataSizeGB*1024*1024*1024 { - logger.Log.Info("data size %d for port %d is larger than %d GB, use physical", - backupSize, cst.BackupTypeAutoDataSizeGB, cnf.Public.MysqlPort) + logger.Log.Infof("data size %d for port %d is larger than %d GB, use physical", + backupSize, cnf.Public.MysqlPort, cst.BackupTypeAutoDataSizeGB) cnf.Public.BackupType = cst.BackupPhysical } else { cnf.Public.BackupType = cst.BackupLogical diff --git a/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/util/misc.go b/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/util/misc.go index fdf03fce25..857ef31a27 100644 --- a/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/util/misc.go +++ b/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/util/misc.go @@ -149,8 +149,12 @@ func DiskUsage(path string) (disk DiskStatus, err error) { } // CheckDiskSpace Check whether disk free space is enough -// 如果返回的值 <0,则表示空间不足,且还需要对应的空间大小 -// 如果返回值 >0,则表示空间足够,且还剩余的空间大小 +// err != nil +// 1. 如果返回的值 <0,则表示空间不足,且还需要对应的空间大小 +// 2. 其他未知错误 +// +// err == nil +// 1. 如果返回值 >0,则表示空间足够,且还剩余的空间大小 func CheckDiskSpace(backupDir string, mysqlPort int, backupSize uint64) (sizeLeft int64, err error) { diskSpaceInfo, err := DiskUsage(backupDir) if err != nil {