[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2883
  • Last Modified:

ERROR 1005 (HY000) at line 147: Can't create table '.\hitandlove\members_services.frm' (errno: 121)

Hi,
I think I have a problem with my Primary Key:

ERROR 1005 (HY000) at line 147: Can't create table '.\hitandlove\members_services.frm' (errno: 121)


CREATE TABLE `members_services` (
  `member_id` int(10) unsigned NOT NULL default '0',
  `service_id` int(10) unsigned NOT NULL default '0',
  `quantity` int(5) unsigned NOT NULL default '0',
  `price` int(5) unsigned NOT NULL default '0',
  `paid_date` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`member_id`,`service_id`),
  KEY `FK_MEMBER_ID` (`member_id`),
  CONSTRAINT `FK_MEMBER_ID` FOREIGN KEY (`member_id`) REFERENCES `members` (`id_member`),
  KEY `FK_SERVICE_ID` (`service_id`),
  CONSTRAINT `FK_SERVICE_ID` FOREIGN KEY (`service_id`) REFERENCES `services` (`id_service`)
);


Thanks.
0
matthew016
Asked:
matthew016
1 Solution
 
Aleksandar BradarićSoftware DeveloperCommented:
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now