{"id":15497689,"url":"https://github.com/techouse/mysql-to-sqlite3","last_synced_at":"2025-05-15T18:08:13.758Z","repository":{"id":40462142,"uuid":"172341111","full_name":"techouse/mysql-to-sqlite3","owner":"techouse","description":"Transfer data from MySQL to SQLite","archived":false,"fork":false,"pushed_at":"2025-03-31T18:54:56.000Z","size":492,"stargazers_count":229,"open_issues_count":5,"forks_count":31,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T23:33:53.788Z","etag":null,"topics":["command-line","mysql","python","sqlite","tool","transfer-data"],"latest_commit_sha":null,"homepage":"https://techouse.github.io/mysql-to-sqlite3/","language":"Python","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/techouse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"techouse","custom":["https://paypal.me/ktusar"]}},"created_at":"2019-02-24T13:30:48.000Z","updated_at":"2025-03-27T06:49:03.000Z","dependencies_parsed_at":"2023-11-18T09:24:32.566Z","dependency_job_id":"5a4b6c76-64ab-431a-9c6a-d90a07ad0b7e","html_url":"https://github.com/techouse/mysql-to-sqlite3","commit_stats":{"total_commits":291,"total_committers":3,"mean_commits":97.0,"dds":"0.044673539518900296","last_synced_commit":"6a743b3162a59cee7997164c38c21ab2719fef5e"},"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techouse%2Fmysql-to-sqlite3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techouse%2Fmysql-to-sqlite3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techouse%2Fmysql-to-sqlite3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techouse%2Fmysql-to-sqlite3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techouse","download_url":"https://codeload.github.com/techouse/mysql-to-sqlite3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755560,"owners_count":20990620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["command-line","mysql","python","sqlite","tool","transfer-data"],"created_at":"2024-10-02T08:40:27.770Z","updated_at":"2025-04-08T00:36:51.159Z","avatar_url":"https://github.com/techouse.png","language":"Python","readme":"[![PyPI](https://img.shields.io/pypi/v/mysql-to-sqlite3)](https://pypi.org/project/mysql-to-sqlite3/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/mysql-to-sqlite3)](https://pypistats.org/packages/mysql-to-sqlite3)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mysql-to-sqlite3)](https://pypi.org/project/mysql-to-sqlite3/)\n[![MySQL Support](https://img.shields.io/static/v1?label=MySQL\u0026message=5.5+|+5.6+|+5.7+|+8.0+|+8.4\u0026color=2b5d80)](https://img.shields.io/static/v1?label=MySQL\u0026message=5.5+|+5.6+|+5.7+|+8.0+|+8.4\u0026color=2b5d80)\n[![MariaDB Support](https://img.shields.io/static/v1?label=MariaDB\u0026message=5.5+|+10.0+|+10.1+|+10.2+|+10.3+|+10.4+|+10.5+|+10.6|+10.11+|+11.4\u0026color=C0765A)](https://img.shields.io/static/v1?label=MariaDB\u0026message=5.5|+10.0+|+10.1+|+10.2+|+10.3+|+10.4+|+10.5|+11.4\u0026color=C0765A)\n[![GitHub license](https://img.shields.io/github/license/techouse/mysql-to-sqlite3)](https://github.com/techouse/mysql-to-sqlite3/blob/master/LICENSE)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE-OF-CONDUCT.md)\n[![PyPI - Format](https://img.shields.io/pypi/format/mysql-to-sqlite3)](https://pypi.org/project/sqlite3-to-mysql/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/64aae8e9599746d58d277852b35cc2bd)](https://www.codacy.com/manual/techouse/mysql-to-sqlite3?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=techouse/mysql-to-sqlite3\u0026amp;utm_campaign=Badge_Grade)\n[![Test Status](https://github.com/techouse/mysql-to-sqlite3/actions/workflows/test.yml/badge.svg)](https://github.com/techouse/mysql-to-sqlite3/actions/workflows/test.yml)\n[![CodeQL Status](https://github.com/techouse/mysql-to-sqlite3/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/techouse/mysql-to-sqlite3/actions/workflows/codeql-analysis.yml)\n[![Publish PyPI Package Status](https://github.com/techouse/mysql-to-sqlite3/actions/workflows/publish.yml/badge.svg)](https://github.com/techouse/mysql-to-sqlite3/actions/workflows/publish.yml)\n[![codecov](https://codecov.io/gh/techouse/mysql-to-sqlite3/branch/master/graph/badge.svg)](https://codecov.io/gh/techouse/mysql-to-sqlite3)\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/techouse)](https://github.com/sponsors/techouse)\n[![GitHub stars](https://img.shields.io/github/stars/techouse/mysql-to-sqlite3.svg?style=social\u0026label=Star\u0026maxAge=2592000)](https://github.com/techouse/mysql-to-sqlite3/stargazers)\n\n# MySQL to SQLite3\n\n#### A simple Python tool to transfer data from MySQL to SQLite 3.\n\n### How to run\n\n```bash\npip install mysql-to-sqlite3\nmysql2sqlite --help\n```\n\n### Usage\n\n```\nUsage: mysql2sqlite [OPTIONS]\n\nOptions:\n  -f, --sqlite-file PATH          SQLite3 database file  [required]\n  -d, --mysql-database TEXT       MySQL database name  [required]\n  -u, --mysql-user TEXT           MySQL user  [required]\n  -p, --prompt-mysql-password     Prompt for MySQL password\n  --mysql-password TEXT           MySQL password\n  -t, --mysql-tables TUPLE        Transfer only these specific tables (space\n                                  separated table names). Implies --without-\n                                  foreign-keys which inhibits the transfer of\n                                  foreign keys. Can not be used together with\n                                  --exclude-mysql-tables.\n  -e, --exclude-mysql-tables TUPLE\n                                  Transfer all tables except these specific\n                                  tables (space separated table names).\n                                  Implies --without-foreign-keys which\n                                  inhibits the transfer of foreign keys. Can\n                                  not be used together with --mysql-tables.\n  -L, --limit-rows INTEGER        Transfer only a limited number of rows from\n                                  each table.\n  -C, --collation [BINARY|NOCASE|RTRIM]\n                                  Create datatypes of TEXT affinity using a\n                                  specified collation sequence.  [default:\n                                  BINARY]\n  -K, --prefix-indices            Prefix indices with their corresponding\n                                  tables. This ensures that their names remain\n                                  unique across the SQLite database.\n  -X, --without-foreign-keys      Do not transfer foreign keys.\n  -Z, --without-tables            Do not transfer tables, data only.\n  -W, --without-data              Do not transfer table data, DDL only.\n  -h, --mysql-host TEXT           MySQL host. Defaults to localhost.\n  -P, --mysql-port INTEGER        MySQL port. Defaults to 3306.\n  --mysql-charset TEXT            MySQL database and table character set\n                                  [default: utf8mb4]\n  --mysql-collation TEXT          MySQL database and table collation\n  -S, --skip-ssl                  Disable MySQL connection encryption.\n  -c, --chunk INTEGER             Chunk reading/writing SQL records\n  -l, --log-file PATH             Log file\n  --json-as-text                  Transfer JSON columns as TEXT.\n  -V, --vacuum                    Use the VACUUM command to rebuild the SQLite\n                                  database file, repacking it into a minimal\n                                  amount of disk space\n  --use-buffered-cursors          Use MySQLCursorBuffered for reading the\n                                  MySQL database. This can be useful in\n                                  situations where multiple queries, with\n                                  small result sets, need to be combined or\n                                  computed with each other.\n  -q, --quiet                     Quiet. Display only errors.\n  --debug                         Debug mode. Will throw exceptions.\n  --version                       Show the version and exit.\n  --help                          Show this message and exit.\n```\n\n#### Docker\n\nIf you don't want to install the tool on your system, you can use the Docker image instead.\n\n```bash\ndocker run -it \\\n    --workdir $(pwd) \\\n    --volume $(pwd):$(pwd) \\\n    --rm ghcr.io/techouse/mysql-to-sqlite3:latest \\\n    --sqlite-file baz.db \\\n    --mysql-user foo \\\n    --mysql-password bar \\\n    --mysql-database baz \\\n    --mysql-host host.docker.internal\n```\n\nThis will mount your host current working directory (pwd) inside the Docker container as the current working directory.\nAny files Docker would write to the current working directory are written to the host directory where you did docker\nrun. Note that you have to also use a\n[special hostname](https://docs.docker.com/desktop/networking/#use-cases-and-workarounds-for-all-platforms) `host.docker.internal`\nto access your host machine from inside the Docker container.\n\n#### Homebrew\n\nIf you're on macOS, you can install the tool using [Homebrew](https://brew.sh/).\n\n```bash\nbrew tap techouse/mysql-to-sqlite3\nbrew install mysql-to-sqlite3\nmysql2sqlite --help\n```\n","funding_links":["https://github.com/sponsors/techouse","https://paypal.me/ktusar"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechouse%2Fmysql-to-sqlite3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechouse%2Fmysql-to-sqlite3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechouse%2Fmysql-to-sqlite3/lists"}