0

I have made a few corrections to location names in a GeoLite2 CSV file. My site only retrieves locations from the MMDB file, so how can I compile back the changed CSV file into the MMDB binary again. I searched everywhere for a solution but can't find it.

Thanks for any tip. Carlos

2 Answers2

2

Currently there are only 2 open source MMDB file writers:

The second one unfortunately has only a subset of the features available for the Perl one, but it should be enough for writing a program that creates the MMDB file reading line by line the CSV one and creating the mmdbtype instances.

Filippo Vitale
  • 7,597
  • 3
  • 58
  • 64
0

You can check out our mmdbctl utility tool.

To convert a CSV file to an MMDB file use the import command:

$ mmdbctl import --in data.csv --out data.mmdb

Instructions, features, and documentation are available here: github.com/ipinfo/mmdbctl.

Right now it only supports string data types, and not nested data types. See this issue for more information.

Reincoder
  • 111
  • 2
  • 7
  • Note that `mmdbctl` currently only supports a subset of the mmdb format, and is not compatible with maxmind provided database files. – Magnus Oct 18 '22 at 02:14
  • 1
    Thank you @Magnus. I wasn't aware of that when I made the comment, I have edited the comment to provide more context. I believe you are referring to this issue: https://github.com/ipinfo/mmdbctl/issues/2 – Reincoder Oct 18 '22 at 16:35
  • 1
    Yes, that is the issue I am referring to. – Magnus Oct 19 '22 at 04:56