How to find Free world city database in mysql
http://www.rocky.nu/software/mysql-world-locations-database
This one contains world cities and Latitude / Longitude
You can also get a world database at geonames org
MaxMind's GeoLite City database is free:
http://www.maxmind.com/app/geolitecity
The website has instructions for inserting the contents into a database table.
It contains city, region/state/province, country, IP address range, latitude, longitude and a bunch more info.
For everywhere except the US, try the National Geospatial Intelligence Agency's GNS Country Files dataset and for the USA, use the USGS Domestic Names Database. This data is copyright free and relatively easy to import into MySQL.
These do not include IP address ranges, that sort of data is commercially available from folks like MaxMind