![maxmind geolite2 maxmind geolite2](https://mauteam.org/wp-content/uploads/2020/01/Mautic-Configuration-for-MaxMind-Geolite2-1.png)
UPDATE thing1 SET uint_from_ip = inet_aton(SUBSTRING(network, 1, LOCATE('/', network) - 1)), Results of the above update statement: mysql> select network,from_ip,to_ip from thing1 įrom here, check out the MySQL Manual Page Miscellaneous Functions for INET_ATON(expr).Įdit2 (thanks to stijn-de-witt again): alter table thing1 add column uint_from_ip int unsigned, add column uint_to_ip int unsigned (For the above update statement, Credit to Bernd Buffen in this answer )
![maxmind geolite2 maxmind geolite2](https://i.stack.imgur.com/OZa76.png)
Set from_ip= INET_NTOA(INET_ATON( SUBSTRING_INDEX(network, '/', 1)) Update table for the varchar's just added update thing1 note that those two are nullable at the moment. So for the time being until I sort that out, I found a varchar modification as seen below.Įdit1 (more to follow, see comments below answer): Alter the table to get a "from ip to ip range"Īlter table thing1 add column from_ip varchar(20), add column to_ip varchar(20) Note however that the referenced blog in the comments had an error in the update statement for going into ints. Begin of Edits belowįor the below, attempting to improve this answer after points made by stijn-de-witt in comments. Is_satellite_provider varchar(20) not null Represented_country_geoname_id varchar(20) not null, Registered_country_geoname_id varchar(20) not null, Network,geoname_id,registered_country_geoname_id,represented_country_geoname_id,is_anonymous_proxy,is_satellite_provider