How to properly add IPv6 data of GeoLite2 into existing table?
To directly answer your question, no, you can't use the exact same code from that tutorial with the IPv6 version. 

Here are a few reasons:


The LOAD DATA LOCAL INFILE query that inserts the data uses MySQL's INET_ATON() function, which won't work with IPv6. Thankfully MySQL has another function INET6_ATON() which supports both IPv4 and IPv6, although it does return a different datatype, VARBINARY(16) instead of integer. Which brings me to point #2...
In the tutorial, the ip_blocks table is created with the ip_from and ip_to columns as int, but as mentioned above, you need VARBINARY(16) to be compatible with IPv6.
The LOAD DATA LOCAL INFILE query also does some integer math to calculate a min  and max IP address based on the CIDR range in the CSV. This won't work with the binary format returned from the INET6_ATON() function.


Most of these obstacles stem from the fact that the IPv6 address space is much larger than the IPv4 space (128 bits versus 32 bits), which means IPv6 can't be stored as a normal integer. So you will need to modify the code and underlying storage quite a bit to make it work.

You can probably use MaxMind's converter tool to get a min and max IP address from the IPv6 range in the CSV, then use the BETWEEN keyword to find IP addresses in that range. See this question for background info: https://stackoverflow.com/questions/42414946/check-if-ipv6-is-inside-range