?
Solved

index not defined error when creating foreign key

Posted on 2014-04-06
7
Medium Priority
?
916 Views
Last Modified: 2014-04-16
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
Comment
Question by:LuiLui77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
7 Comments
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39982142
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
 
LVL 14

Expert Comment

by:dejaanbu
ID: 39982176
this may help

detailed info
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:LuiLui77
ID: 39983526
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
 

Accepted Solution

by:
LuiLui77 earned 0 total points
ID: 39994337
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
 

Author Closing Comment

by:LuiLui77
ID: 40003497
Not a real solution but a good workaround that fixed my issue.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
The viewer will learn how to dynamically set the form action using jQuery.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question