{"id":42655087,"url":"https://github.com/jarvanstack/mysqldump","last_synced_at":"2026-01-29T07:49:39.427Z","repository":{"id":143372314,"uuid":"615231466","full_name":"jarvanstack/mysqldump","owner":"jarvanstack","description":"A zero-dependency, high-performance, concurrent mysqldump tool implemented in golang. golang 中实现的零依赖、支持所有类型、 高性能、并发 mysqldump 工具。","archived":false,"fork":false,"pushed_at":"2023-10-16T05:07:06.000Z","size":156,"stargazers_count":259,"open_issues_count":7,"forks_count":46,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-06-20T05:04:47.048Z","etag":null,"topics":["golang","mysql","mysqldump","mysqldump-api","mysqldumper"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jarvanstack.png","metadata":{"files":{"readme":"README-zh.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-17T08:34:41.000Z","updated_at":"2024-05-16T04:00:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"841742aa-432c-4707-a550-45fcb00b5803","html_url":"https://github.com/jarvanstack/mysqldump","commit_stats":null,"previous_names":["dengjiawen8955/mysqldump"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/jarvanstack/mysqldump","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvanstack%2Fmysqldump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvanstack%2Fmysqldump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvanstack%2Fmysqldump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvanstack%2Fmysqldump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarvanstack","download_url":"https://codeload.github.com/jarvanstack/mysqldump/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvanstack%2Fmysqldump/sbom","scorecard":{"id":506863,"data":{"date":"2025-08-11","repo":{"name":"github.com/jarvanstack/mysqldump","commit":"8489f418ffe577e3a517ca17e9616879e41f65fa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 5/24 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go-build-test.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/golangci-lint.yml:10","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go-build-test.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/jarvanstack/mysqldump/go-build-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go-build-test.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/jarvanstack/mysqldump/go-build-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go-build-test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/jarvanstack/mysqldump/go-build-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/jarvanstack/mysqldump/golangci-lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/jarvanstack/mysqldump/golangci-lint.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/jarvanstack/mysqldump/golangci-lint.yml/master?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T23:26:05.706Z","repository_id":143372314,"created_at":"2025-08-19T23:26:05.707Z","updated_at":"2025-08-19T23:26:05.707Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28870696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T07:35:32.468Z","status":"ssl_error","status_checked_at":"2026-01-29T07:33:31.463Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","mysql","mysqldump","mysqldump-api","mysqldumper"],"created_at":"2026-01-29T07:49:39.056Z","updated_at":"2026-01-29T07:49:39.401Z","avatar_url":"https://github.com/jarvanstack.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"images/logo.png\" width=\"200px\"/\u003e\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://img.shields.io/github/stars/jarvanstack/mysqldump\" /\u003e\n \u003cimg src=\"https://img.shields.io/github/issues/jarvanstack/mysqldump\" /\u003e\n \u003cimg src=\"https://img.shields.io/github/forks/jarvanstack/mysqldump\" /\u003e\n\u003c/p\u003e\n\u003c/p\u003e\n\n## mysqldump\n\n[English](./README.md)\n\ngolang 实现的零依赖、支持所有类型、高性能、并发 mysqldump 工具。\n\n\n## Features\n\n* 自定义 Writer: 如本地文件、多文件储存、远程服务器、云存储等。（默认控制台输出）。\n* 支持所有 MYSQL 数据类型.\n* 支持 INSERT Merge, 大幅提升数据恢复性能\n\n## QuickStart\n\n### Create Table and Insert Test Data\n\n```sql\nDROP TABLE IF EXISTS `test`;\n\nCREATE TABLE `test` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `char_col` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `varchar_col` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `binary_col` binary(10) DEFAULT NULL,\n  `varbinary_col` varbinary(255) DEFAULT NULL,\n  `tinyblob_col` tinyblob,\n  `tinytext_col` tinytext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,\n  `text_col` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,\n  `blob_col` blob,\n  `mediumtext_col` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,\n  `mediumblob_col` mediumblob,\n  `longtext_col` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,\n  `longblob_col` longblob,\n  `enum_col` enum('value1','value2','value3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `set_col` set('value1','value2','value3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `bit_col` bit(8) DEFAULT NULL,\n  `tinyint_col` tinyint NOT NULL DEFAULT '0',\n  `bool_col` tinyint(1) NOT NULL DEFAULT '0',\n  `boolean_col` tinyint(1) NOT NULL DEFAULT '0',\n  `smallint_col` smallint NOT NULL DEFAULT '0',\n  `mediumint_col` mediumint NOT NULL DEFAULT '0',\n  `int_col` int NOT NULL DEFAULT '0',\n  `integer_col` int NOT NULL DEFAULT '0',\n  `bigint_col` bigint NOT NULL DEFAULT '0',\n  `float_col` float(8,2) NOT NULL DEFAULT '0.00',\n  `double_col` double(8,2) NOT NULL DEFAULT '0.00',\n  `decimal_col` decimal(10,2) NOT NULL DEFAULT '0.00',\n  `dec_col` decimal(10,2) NOT NULL DEFAULT '0.00',\n  `date_col` date DEFAULT NULL,\n  `datetime_col` datetime DEFAULT NULL,\n  `timestamp_col` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  `time_col` time DEFAULT NULL,\n  `year_col` year DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;\n\nINSERT INTO `test` VALUES (1,'abc','def',0x61626300000000000000,0x646566,0x74696E79626C6F62,'Hello','World',0x776F726C64,'Medium Text',0x4D656469756D426C6F62,'Long Text',0x4C6F6E67426C6F62,'value2','value1,value3',0x66,-128,1,0,-32768,-8388608,-2147483648,-2147483648,-9223372036854775808,1234.56,1234.56,1234.56,1234.56,'2023-03-17','2023-03-17 10:00:00','2023-03-17 14:04:46','10:00:00',2023);\n\n```\n\n### Dump SQL\n\n```go\nimport (\n\t\"os\"\n\n\t\"github.com/jarvanstack/mysqldump\"\n)\n\nfunc main() {\n\n\tdsn := \"root:rootpasswd@tcp(localhost:3306)/dbname?charset=utf8mb4\u0026parseTime=true\u0026loc=Asia%2FShanghai\"\n\n\tf, _ := os.Create(\"dump.sql\")\n\n\t_ = mysqldump.Dump(\n\t\tdsn,                          // DSN\n\t\tmysqldump.WithDropTable(),    // Option: Delete table before create (Default: Not delete table)\n\t\tmysqldump.WithData(),         // Option: Dump Data (Default: Only dump table schema)\n\t\tmysqldump.WithTables(\"test\"), // Option: Dump Tables (Default: All tables)\n\t\tmysqldump.WithWriter(f),      // Option: Writer (Default: os.Stdout)\n\t)\n}\n\n```\n\n### Output File dump.sql\n\n```sql\n-- ----------------------------\n-- MySQL Database Dump\n-- Start Time: 2023-04-21 14:16:56\n-- ----------------------------\n\n\nUSE `dc3`;\nDROP TABLE IF EXISTS `test`;\n-- ----------------------------\n-- Table structure for test\n-- ----------------------------\nCREATE TABLE IF NOT EXISTS `test` (\n  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n  `char_col` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `varchar_col` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `binary_col` binary(10) DEFAULT NULL,\n  `varbinary_col` varbinary(255) DEFAULT NULL,\n  `tinyblob_col` tinyblob,\n  `tinytext_col` tinytext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,\n  `text_col` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,\n  `blob_col` blob,\n  `mediumtext_col` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,\n  `mediumblob_col` mediumblob,\n  `longtext_col` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,\n  `longblob_col` longblob,\n  `enum_col` enum('value1','value2','value3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `set_col` set('value1','value2','value3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `bit_col` bit(8) DEFAULT NULL,\n  `tinyint_col` tinyint NOT NULL DEFAULT '0',\n  `bool_col` tinyint(1) NOT NULL DEFAULT '0',\n  `boolean_col` tinyint(1) NOT NULL DEFAULT '0',\n  `smallint_col` smallint NOT NULL DEFAULT '0',\n  `mediumint_col` mediumint NOT NULL DEFAULT '0',\n  `int_col` int NOT NULL DEFAULT '0',\n  `integer_col` int NOT NULL DEFAULT '0',\n  `bigint_col` bigint NOT NULL DEFAULT '0',\n  `float_col` float(8,2) NOT NULL DEFAULT '0.00',\n  `double_col` double(8,2) NOT NULL DEFAULT '0.00',\n  `decimal_col` decimal(10,2) NOT NULL DEFAULT '0.00',\n  `dec_col` decimal(10,2) NOT NULL DEFAULT '0.00',\n  `date_col` date DEFAULT NULL,\n  `datetime_col` datetime DEFAULT NULL,\n  `timestamp_col` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  `time_col` time DEFAULT NULL,\n  `year_col` year DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;\n\n\n\n-- ----------------------------\n-- Records of test\n-- ----------------------------\nINSERT INTO `test` VALUES (1,'abc','def',0x61626300000000000000,0x646566,0x74696E79626C6F62,'Hello','World',0x776F726C64,'Medium Text',0x4D656469756D426C6F62,'Long Text',0x4C6F6E67426C6F62,'value2','value1,value3',0x66,-128,1,0,-32768,-8388608,-2147483648,-2147483648,-9223372036854775808,1234.56,1234.56,1234.56,1234.56,'2023-03-17','2023-03-17 10:00:00','2023-03-17 14:04:46','10:00:00',2023);\n\n\n-- ----------------------------\n-- Dumped by mysqldump2\n-- Cost Time: 5.81592ms\n-- ----------------------------\n\n```\n\n### Source SQL\n\n```go\nimport (\n\t\"os\"\n\n\t\"github.com/jarvanstack/mysqldump\"\n)\n\nfunc main() {\n\n\tdsn := \"root:rootpasswd@tcp(localhost:3306)/dbname?charset=utf8mb4\u0026parseTime=true\u0026loc=Asia%2FShanghai\"\n\tf, _ := os.Open(\"dump.sql\")\n\n\t_ = mysqldump.Source(\n\t\tdsn,\n\t\tf,\n\t\tmysqldump.WithMergeInsert(1000), // Option: Merge insert 1000 (Default: Not merge insert)\n\t\tmysqldump.WithDebug(),           // Option: Print execute sql (Default: Not print execute sql)\n\t)\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarvanstack%2Fmysqldump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarvanstack%2Fmysqldump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarvanstack%2Fmysqldump/lists"}