1.       Change the configuration file of MySQL. (MySQL can’t identify some incorrect strings of the .csv file we want to load, so that we have to change the setting of MySQL)

l         Open your "my.ini" file within the MySQL installation directory, and look for the text "sql-mode". Find:

l         Add the following code to “my.ini” file

 File Name Download Link 1. GeoIPCountryCSV.zip (It contains one database file) http://www.maxmind.com/app/geoip_country 2. GeoLiteCity_20100601.zip (It contains two database files) http://www.maxmind.com/app/geolitecity

Note: Actually, there is one database named GeoLiteRegion, which doesn’t have free version right now. So we didn’t choose to use it.

3.       Use MySQL Workbench to load the unzipped .csv files to database

l         According to the number of columns of the .csv file, we need to create the corresponding table and give a name to each column.

l         After the table has been established, we can use the following command to automatically load the data :

If you guys are still confusing about the code above, you check the following websites out:

Powered by Hydejack v6.6.1