ip2proxy/mysql
IP2Proxy Proxy IP detection database with MySQL setup.
179
This is a pre-configured, ready-to-run MySQL server with IP2Proxy Proxy IP database. It simplifies the development team to install and set up the proxy IP database in MySQL server. The setup script supports the commercial database packages and free LITE package. Please register for a download account before running this image.
Run this image as daemon with your username, password, and download code registered from IP2Location.
docker run --name ip2proxy -d -e TOKEN={DOWNLOAD_TOKEN} -e CODE={DOWNLOAD_CODE} -e IP_TYPE=IPV4 -e MYSQL_PASSWORD={MYSQL_PASSWORD} ip2proxy/mysql
ENV VARIABLE
TOKEN – Download token obtained from IP2Location.
CODE – Database code. Codes available as below:
IP_TYPE - (Optional) Download IPv4, IPv6 or both database. Script will download both database by default.
MYSQL_PASSWORD - (Optional) Password for MySQL admin. A random password will be generated by default.
The installation may take minutes to hour depending on your internet speed and hardware. You may check the installation status by viewing the container logs. Run the below command to check the container log:
docker logs -f ip2proxy
You should see the line of > Setup completed
if you have successfully complete the installation.
docker run --link ip2proxy:ip2proxy-db -t -i application_using_the_ip2proxy_data
mysql -u admin -pYOUR_MYSQL_PASSWORD -h ip2proxy-db ip2proxy_database -e 'SELECT * FROM `ip2proxy_database` WHERE INET6_ATON("8.8.8.8") BETWEEN ip_from AND ip_to LIMIT 1'
Notes: If not result returned, the lookup IP address is not a proxy IP address.
To update your IP2Proxy database to latest version, please run the following command:
docker exec -it ip2proxy ./update.sh
docker pull ip2proxy/mysql