• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 941
  • Last Modified:

index not defined error when creating foreign key

I am managing mysql 5.6 with phpMyadmin 2.8.1 which are hosted by IPower (web hosting company).

I have created 2 tables and have set them up as InnoDB.

The tables created names are: users and patient_id.

In the patient_id table I have added a column to be used as the foreign key that will be related to the "id" column in the users table.

I have indexed this column in the patient_id table.

When I go into the relationship view of the table and try to setup the relationship , I get "No Index found for the column" even though I have indexed it already!

I have attached screenshots of the database structure and the error message.

Any help will be greatly appreciated! Thanks
Q-28406140.png
0
LuiLui77
Asked:
LuiLui77
  • 4
1 Solution
 
LuiLui77Author Commented:
0
 
Dan CraciunIT ConsultantCommented:
Can you post the designer view of your database?
You can get it by clicking on the database name on the left, then clicking on "Designer".
See image.
designer view
0
 
dejaanbuCommented:
this may help

detailed info
0
Industry Leaders: 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!

 
LuiLui77Author Commented:
I don't have Designer available on phpMyadmin, so I had to draw it in excel en posted it as a picture.
Tables-relationship.png
0
 
LuiLui77Author Commented:
I ended up on creating the tables on a test mysql server and setting up the relationship, then I exported the database and imported it into the production server. Now the tables are related.

Thank you.
0
 
LuiLui77Author Commented:
Not a real solution but a good workaround that fixed my issue.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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