external database in Frappe:


External Database Connector: Feeder

When using Feeder, there is a field called Database Name. This field is used to connect to an external database and retrieve data from it.

How to Connect to the External Database:

Step 1: Configure the site_config.json

Go to your site_config.json file in your Frappe bench directory (do not use common_site_config.json).

Step 2: Configure the External Database

In site_config.json, configure the external database settings. The configuration should be in the form of a dictionary of dictionaries. For example:

"external_db": {
    "db_name_1": {
        "host": "your_host",
        "user": "your_username",
        "password": "your_password",
        "port": "your_port"
    },
    "db_name_2": {
        "host": "your_host",
        "user": "your_username",
        "password": "your_password",
        "port": "your_port"
    }
}

  • Replace "your_host", "your_username", "your_password", and "your_port" with the actual credentials for your external databases.

  • You can add multiple external databases as needed.

Once this configuration is done, Feeder will be able to connect to the external databases and retrieve the necessary data.