有没有办法获取所有国家、州和城市的 mysql 数据?(转储文件)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16020942/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 17:20:52  来源:igfitidea点击:

Is there any way to get all country,state and cities mysql data ? (a dump file)

mysql

提问by

I'm working on a project and I need a database or MySQL table of list of countries, states and cities.

我正在做一个项目,我需要一个包含国家、州和城市列表的数据库或 MySQL 表。

I need a free one.

我需要一个免费的。

采纳答案by Bill Karwin

This question has been answered many times on StackOverflow, but here are several resources:

这个问题在 StackOverflow 上已经回答了很多次,但这里有几个资源:

Github for sql files https://github.com/hiiamrohit/Countries-States-Cities-database

用于 sql 文件的 Github https://github.com/hiiamrohit/Countries-States-Cities-database



edit:

编辑:

User @Juan Escobar suggested in an edit that another source for such data is http://dev.mysql.com/doc/world-setup/en/index.htmlBut that's just an example database provided by MySQL.com. I don't think it's intended to be comprehensive or current.

用户@Juan Escobar 在编辑中建议此类数据的另一个来源是 http://dev.mysql.com/doc/world-setup/en/index.html但这只是 MySQL.com 提供的示例数据库。我不认为它的目的是全面或最新的。

That database is derived from data available at Statistics Finland, so that may be a better source for current data.

该数据库源自芬兰统计局的可用数据,因此它可能是当前数据的更好来源。