TangibleDream
TangibleDream

Reputation: 611

Relationship issue in the MySql designer

Normally I have no issue with MySQL's PHPmyadmin designer to create referential integrity relations.

All of a sudden, I now get a 99% Loading in my browser window, and a popup php.

Reproduce;

  1. Select a database.
  2. Select designer.
  3. Select 'Set Relation'
  4. Select a primary key
  5. Select a coresponding foriegn key
  6. Approve confirmation

Expected results; (and what I usually get)

A relationship is setup. A line connecting two keys.

Actual results;

  1. a green label "Loading 99%" appears in upper right corner.
  2. a second window pops up http://localhost/phpmyadmin/pmd_general.php?db=jobhunt&server=1&token=d8235.....
  3. Relationship does not occur.

Is anyone else getting this?

Upvotes: 2

Views: 6376

Answers (4)

kbhatta
kbhatta

Reputation: 457

This method works for me:
1. Select table and click on Operations.
2. Change Storage Engine in table option to InnoDB.
3. Hit "Go" button.
Now, you can add foreign key by adding INDEX on column.

Upvotes: 0

Rafael Barros
Rafael Barros

Reputation: 1053

Yep, it was happening with me too. I've made some attempts here and discovered that the error of the blank pop-up occurs because I was trying to make a relationship with a foreign key that has no index set up.

Create an index for the future foreign key column and that may resolve.

Pay attention that when you try to make the relation without the index, the confirm box that appears has just a "Ok" and "Cancel" button, while when you already have the index, it permits you to set up the behaviors on delete and on update.

Upvotes: 3

Roberto Callos
Roberto Callos

Reputation: 21

[Solved] Just update Java for Windows plugin for your browser (Firefox, Chrome...) Go to Java site and update Java Firefox plugin.

One more solution is install and use SQLyog;

Upvotes: 2

TangibleDream
TangibleDream

Reputation: 611

While I still do not know why the interface decided to break but an add Forien Key works fine.

ALTER TABLE tableblah   
add FOREIGN KEY FCK2-BLAH ([Foreign-Key column]) REFERENCES [primary key table]([primary key column]);

Upvotes: 1

Related Questions