Relationship issue in the MySql designer

2019-07-15 16:51发布

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?

4条回答
劳资没心,怎么记你
2楼-- · 2019-07-15 17:34

[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;

查看更多
爷、活的狠高调
3楼-- · 2019-07-15 17:36

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]);
查看更多
Deceive 欺骗
4楼-- · 2019-07-15 17:47

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.

查看更多
神经病院院长
5楼-- · 2019-07-15 17:54

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.

查看更多
登录 后发表回答