Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7592079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:48:57+00:00 2026-05-30T20:48:57+00:00

i use mysql work bench to export sql from erd that i create, but

  • 0

i use mysql work bench to export sql from erd that i create, but when i try to importing it to mysql, i just get error 150 Cannot create table.

when i try to remove constrain of service child, its just work. but i need to keep those referenced.

and every table that reference to service table, also have this error too. where am i wrong ?

CREATE  TABLE IF NOT EXISTS `service` (
  `id` INT(11) NOT NULL AUTO_INCREMENT ,
  `name` VARCHAR(200) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
  `seq` INT(11) NOT NULL ,
  `image` VARCHAR(200) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
  PRIMARY KEY (`id`) )
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;

CREATE  TABLE IF NOT EXISTS `service_package` (
  `id` INT(11) NOT NULL AUTO_INCREMENT ,
  `sc_id` INT(11) NOT NULL ,
  `lang` INT(11) NOT NULL ,
  `package` VARCHAR(200) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' NOT NULL ,
  PRIMARY KEY (`id`) ,
  INDEX `service_package_id` (`sc_id` ASC) ,
  CONSTRAINT `service_package_id`
    FOREIGN KEY (`sc_id` )
    REFERENCES `service` (`id` )
    ON DELETE CASCADE
    ON UPDATE CASCADE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T20:48:59+00:00Added an answer on May 30, 2026 at 8:48 pm

    You’re using ENGINE = MyISAM on the service table. Try using ENGINE = InnoDB instead (as you do on the service_package table).

    Foreign keys do not work with the MyIsam storage engine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

MySQL uses the USE database_name to change the active database. Does that work on
I work on Spring MVC + Hibernate application, use MySQL (ver. 5.0.51a) with the
I just installed MySQL 5 on my server and imported a database from another
I've just downloaded MySQL Workbench. But I don't quite understand how to syn this
When I use MySQL Workbench to create a simple table with a single primary
I usually use MySQL Query Browser for my queries, but I always run into
I am looking for a tool with that I can create a database ERD
Can I use mysql database from my personal web server instead of heroku's database?
hy! I just created a little MYSQL remote c# tool. The Problem is, that
I recently had to switch from using Microsofts SQL server to using MySQL. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.