Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see .mmdb file content? [closed]

I have a file GeoLite2-City.mmdb which is MaxMind DB File.

I want to see its content.

Is there any application, tool to show this .mmdb file?

like image 577
sam Avatar asked Aug 08 '18 09:08

sam


Video Answer


1 Answers

See Maxmind's mmdb file specification.

mmdb databases are self contained "search tree indexed files" so you cannot just sequentially read and display the file record by record (even its "data records" include pointers to other "cache" data records that contain the actual human readable strings such as country name). So the sort of view provided by text editors is no use - you need an equivalent of the "table" row viewer for MySQL in phpMyAdmin allowing both "sequential" display or look-up by IP.

As far as I am aware no such viewer is available. They are huge files and if you just wish to view out of interest then its not worth the effort.

A capable programmer could write their own viewer, but I would describe the task as challenging (and I started programming creating and navigating suites of indexed sequential files on a pre-DBMS IBM mainframe). Maxmind's post on building (and reading) your own MMDB will provide useful pointers.

The above specification contains links to Reader Libraries/Packages in various languages and you could use or add to these existing Reader functions (e.g. for PHP Reader see Reader.php and Decoder.php)

For "sequential" display you will need to iterate through the file (e.g. Perl: iterate_search_tree ). I'm not sure if an equivalent function is directly built in to all of Maxminds Readers or whether you will have to extend.

like image 122
scytale Avatar answered Sep 30 '22 19:09

scytale