{"id":29016543,"url":"https://github.com/memgraph/mgmigrate","last_synced_at":"2025-06-25T22:30:38.600Z","repository":{"id":44589189,"uuid":"298838298","full_name":"memgraph/mgmigrate","owner":"memgraph","description":"mgmigrate is a tool for migrating data from MySQL or PostgreSQL to Memgraph and between Memgraph instances.","archived":false,"fork":false,"pushed_at":"2023-08-10T12:07:25.000Z","size":5891,"stargazers_count":20,"open_issues_count":6,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-08-10T16:37:30.504Z","etag":null,"topics":["cypher","memgraph","migration","migration-tool","mysql","postgresql"],"latest_commit_sha":null,"homepage":"https://github.com/memgraph/mgmigrate","language":"Cypher","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memgraph.png","metadata":{"files":{"readme":"README.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}},"created_at":"2020-09-26T15:02:02.000Z","updated_at":"2023-08-10T12:07:31.000Z","dependencies_parsed_at":"2022-09-03T21:53:03.582Z","dependency_job_id":null,"html_url":"https://github.com/memgraph/mgmigrate","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/memgraph/mgmigrate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fmgmigrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fmgmigrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fmgmigrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fmgmigrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memgraph","download_url":"https://codeload.github.com/memgraph/mgmigrate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fmgmigrate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261962068,"owners_count":23236863,"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":["cypher","memgraph","migration","migration-tool","mysql","postgresql"],"created_at":"2025-06-25T22:30:37.405Z","updated_at":"2025-06-25T22:30:38.556Z","avatar_url":"https://github.com/memgraph.png","language":"Cypher","readme":"\u003ch1 align=\"center\"\u003e\n  mgmigrate\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/memgraph/mgmigrate/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/memgraph/mgmigrate\" alt=\"license\" title=\"license\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/memgraph/mgmigrate/actions\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/workflow/status/memgraph/mgmigrate/CI\" alt=\"build\" title=\"build\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/memgraph/mgmigrate\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"build\" title=\"build\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://twitter.com/intent/follow?screen_name=memgraphdb\"\u003e\u003cimg\n    src=\"https://img.shields.io/twitter/follow/memgraphdb.svg?label=Follow%20@memgraphdb\"\n    alt=\"Follow @memgraphdb\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Notice: \n\n**The project has been archived. It's based on some really interesting research papers, however unfortunately the code has not kept up with changes so we've decided to archive it. We might revisit this research and resurrect this project in the future.\nIf you would like to contribute, have feedback or suggestions please visit our [Discord server](https://www.discord.gg/memgraph)**\n\nWelcome to the **mgmigrate** tool repository. This tool can help you migrate\ndata from a\n[PostgreSQL](https://memgraph.com/docs/memgraph/import-data/migrate/postgresql)\nor [MySQL](https://memgraph.com/docs/memgraph/import-data/migrate/mysql)\ndatabase to Memgraph. It can also be used to migrate data between Memgraph\ninstances.\n\n## ⚙️ Installation guide\n\nYou can install mgmigrate on the following systems:\n\n* [Linux instructions](#linux)\n* [Windows instructions](#windows)\n* [macOS instructions](#macos)\n\n### Linux\n\nTo install compile dependencies on **Debian / Ubuntu** run:\n\n```\napt-get install -y git cmake make gcc g++ python3 libpq-dev postgresql-server-dev-all\npip3 install pymgclient psycopg2 mysql-connector-python\n```\n\nOn **RedHat / CentOS / Fedora** run:\n\n```\nyum install -y git cmake make gcc gcc-c++ python3 libpqxx-devel\npip3 install pymgclient psycopg2 mysql-connector-python\n```\n\nOnce all the requirements are in place, create a build directory inside the\nsource directory and configure the build by running CMake from it as follows:\n\n```console\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=. ..\n```\n\nContinue with the [Building and installing](#building-and-installing) step.\n\n### Windows\n\nBefore you can install mgmigrate on Windows, you will need to install the needed\ndependencies. On **Windows**, you need to install the MSYS2. Just follow the\n[instructions](https://www.msys2.org), up to step 6. In addition, OpenSSL must\nbe installed. You can easily install it with an\n[installer](https://slproweb.com/products/Win32OpenSSL.html). The Win64 version\nis required, although the \"Light\" version is enough. Both EXE and MSI variants\nshould work. Then, you'll need to install the dependencies using the MSYS2\nMINGW64 terminal, which should be available from your Start menu. Just run the\nfollowing command inside the MSYS2 MINGW64 terminal:\n\n```console\npacman -Syu --needed base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-openssl mingw-w64-x86_64-postgresql\n```\n\nOnce all the requirements are in place, create a build directory inside the\nsource directory and configure the build by running CMake from it as follows:\n\n```console\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release -G\"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=. ..\n```\n\nContinue with the [Building and installing](#building-and-installing) step.\n\n### macOS\n\nOn **macOS**, first, make sure you have\n[XCode](https://developer.apple.com/xcode/) and [Homebrew](https://brew.sh)\ninstalled. Then, in the terminal, run:\n\n```\nbrew install git cmake make openssl postgresql\n```\n\nOnce all the requirements are in place, create a build directory inside the\nsource directory and configure the build by running CMake from it as follows:\n\n```console\nmkdir build \u0026\u0026 cd build\ncmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=\"$(ls -rd -- /usr/local/Cellar/openssl@1.1/* | head -n 1)\" -DCMAKE_INSTALL_PREFIX=. ..\n```\n\nContinue with the [Building and installing](#building-and-installing) step.\n\n### Building and installing\n\nAfter running CMake, you should see a Makefile in the build directory. Then you\ncan build the project by running:\n\n```console\nmake\n```\n\nOnce all the requirements are in place, run:\n\n```console\nmake install\n```\n\nThis will install mgmigrate in the default system installation directory. If you\nwant to change this location, use `-DCMAKE_INSTALL_PREFIX` option when running\nCMake.\n\n## 📋 Usage\n\n### MySQL\n\nThis is an example of using mgmigrate with a MySQL database:\n\n```console\nbuild/src/mgmigrate --source-kind=mysql /\n  --source-host 127.0.0.1 /\n  --source-port 33060 /\n  --source-username root /\n  --source-password mysql /\n  --source-database=exampledatabase /\n  --destination-host 127.0.0.1 /\n  --destination-port 7687 /\n  --destination-use-ssl=false\n```\n\n### PostgreSQL\n\nHere is an example of how to use the mgmigrate tool with PostgreSQL:\n\n```console\nbuild/src/mgmigrate --source-kind=postgresql /\n  --source-host 127.0.0.1 /\n  --source-port 5432 /\n  --source-username postgres /\n  --source-password postgres /\n  --source-database=exampledatabase /\n  --destination-host 127.0.0.1 /\n  --destination-port 7687 /\n  --destination-use-ssl=false\n```\n\n## 🔎 Arguments\n\nThe available arguments are:\n\n| Parameter      | Description | Default     |\n| -------------- | ----------- | ----------- |\n| --source-kind         | The kind of the given server. Supported options are: `memgraph` , `mysql` and `postgresql`. | memgraph\n| --source-host         | Server address of the source database. | 127.0.0.1\n| --source-port         | Server port of the source database.  | 0\n| --source-username     | Username for the source database. | -\n| --source-password     | Password for the source database. | -\n| --source-database     | Database name. Applicable to PostgreSQL and MySQL source. | -\n| --destination-use-ssl | Should the connection to the source database (if Memgraph) use SSL. | false\n| --destination-host    | Server address of the destination database. | 127.0.0.1\n| --destination-port    | Server port number of the destination database. | 7687\n| --destination-username| Username for the destination database. | -\n| --destination-password| Password for the destination database. | -\n| --destination-use-ssl | Should the connection to the destination database (if Memgraph) use SSL. | false\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fmgmigrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemgraph%2Fmgmigrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fmgmigrate/lists"}