I am trying to import a file *.sql from MySQL database on my server backup to new webhosting. I try to import via phpMyAdmin. I tried running XAMPP on local machine and import and am still getting the same error. Here is the create table statement:
CREATE TABLE `yv3nd_rokgallery_file_loves` (
`file_id` int(10) unsigned NOT NULL DEFAULT '0',
`kount` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`file_id`),
UNIQUE KEY `file_id` (`file_id`),
CONSTRAINT `yv3nd_file_loves_file_id_files_id` FOREIGN KEY (`file_id`)
REFERENCES `yv3nd_rokgallery_files` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8
I got: #1005 - Can't create table 'test.yv3nd_rokgallery_file_loves' (errno: 150)
I'm pretty new to this so any help to fix this error would be appreciated.
Here is more code:
CREATE TABLE yv3nd_rokgallery_files(
id int(10) unsigned NOT NULL AUTO_INCREMENT,
filename varchar(255) NOT NULL,
guid char(36) NOT NULL,
md5 char(32) NOT NULL,
title varchar(200) NOT NULL,
description text,
license varchar(255) DEFAULT NULL,
xsize int(10) unsigned NOT NULL,
ysize int(10) unsigned NOT NULL,
filesize int(10) unsigned NOT NULL,
type char(20) NOT NULL,
published tinyint(1) NOT NULL DEFAULT '0',
created_at datetime NOT NULL,
updated_at datetime NOT NULL,
slug varchar(255) DEFAULT NULL,
PRIMARY KEY (id), UNIQUE KEY id (id),
UNIQUE KEY guid (guid),
UNIQUE KEY yv3nd_files_sluggable_idx (slug),
KEY yv3nd_rokgallery_files_published_idx (published),
KEY yv3nd_rokgallery_files_md5_idx (md5),
KEY yv3nd_rokgallery_files_guid_idx (guid))
ENGINE=InnoDB DEFAULT CHARSET=utf8;