Stack
Stack

Reputation: 519

How to import this github repo's sql files in phpmyadmin

I want to import this repo databases to my database:

https://github.com/dr5hn/countries-states-cities-database

I'm trying to import the cites.sql, state.sql and countries.sql in phpmyadmin, but it shows this error:

Can't create table `<tablename>`.`#sql-450c_17f` (errno: 150 "Foreign key constraint is incorrectly formed")**

Upvotes: 1

Views: 168

Answers (1)

Dominik
Dominik

Reputation: 26

Check if the referring column is the same data type or length as the foreign key column

For example ( referring: int(10), foreign: int(10) )

Upvotes: 1

Related Questions