Socket
Socket
Sign inDemoInstall

mysql-to-mongo

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mysql-to-mongo

Migrate your MySql databse to MongoDb.


Maintainers
1

Readme

A Simple python Script to migrate data from MySQL to MongoDB

        Author: ArJun Gawali (arjungawali111@gmail.com)
        Date: 27 Oct, 2021
        Version: 1.0.3
        Purpose: Migrate Data from MySQL to Mongo

You can find the module here You can install it with following command :

pip install mysql-to-mongo==1.0.3

How to use :


        import mysql_to_mongo
        mysql_to_mongo.migrate_all(mysqldb_dict,mongodb_host,mongodb_dbname)

Functions :

  1. migrate_all : Migrate all tables from mysql to mongodb

    • Parameters :

      • mysqldb_dict : A Python dictionary of your mysql database details

                  Ex :
                      mysqldb_dict = {
                          "mysql_host" :"localhost",
                          "mysql_database" : "sample_database",
                          "mysql_user" : "root",
                          "mysql_password" : "*******",
                      }
        
      • mongodb_host : Your MongoDb hostname/Url

      • mongodb_dbname : Choose the name of Database in which the data has to migrate.

  2. migrate_single : Migrate specified table

    • Parameters :

      • mysqldb_dict : A Python dictionary of your mysql database details

                  Ex :
                      mysqldb_dict = {
                          "mysql_host" :"localhost",
                          "mysql_database" : "sample_database",
                          "mysql_user" : "root",
                          "mysql_password" : "*******",
                      }
        
      • mongodb_host : Your MongoDb hostname/Url

      • mongodb_dbname : Choose the name of Database in which the data has to migrate.

      • table : Specific table which has to migrate

Change Log

1.0.1 (27/10/2021)

  • First Release

1.0.2 (27/10/2021)

  • adding linux in os

1.0.3 (27/10/2021)

  • how to use added in README.md

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc