sql - 如何在 phpmyadmin 中导入这个 github repo 的 sql 文件
问题描述
我想将此 repo 数据库导入我的数据库:
https://github.com/dr5hn/countries-states-cities-database
我正在尝试在 phpmyadmin 中导入 cites.sql、state.sql 和 country.sql,但它显示此错误:
Can't create table `<tablename>`.`#sql-450c_17f` (errno: 150 "Foreign key constraint is incorrectly formed")**
解决方案
检查引用列是否与外键列的数据类型或长度相同
例如(参考:int(10),国外:int(10))
推荐阅读
- visual-c++ - Visual C++ 看不到我的课程
- javascript - 如何使用 AWS Lambda (javascript) 下载大型 S3 文件
- python - 使用 Boost.Python 嵌入 Python 的 C++
- javascript - 使用 Jquery 使包含 iFrame 的外部 Div 可点击
- angular - 我想在我的欢迎组件上以角度 4 显示登录组件
- jquery - 引导工具提示函数被异步调用。如何在调用下一个函数之前等待它完成?
- c# - 如何在没有 linq 的情况下获取 List<> 中的元素计数
- python - 绘制一个空白条形图
- multithreading - 在使用 std::condition_variable 之前锁定互斥锁
- android - FileOutputStream.write 上的 ArrayIndexOutOfBoundsException