Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpmyadmin only displays internal relation in relational view

I am trying to setup foreign key for my mysql database using phpmyadmin. But phpmyadmin only displays internal relation in 'relational view'. Note I have already made sure of following steps.

  1. Setup phpmyadmin database (create_table.sql and config stuff) phpmyadmin status

  2. Made sure all tables in my database using InnoDb Inno db

  3. Made sure my intended foreign keys/reference Keyes are indexed. enter image description here

After all these steps I can only see internal relations in my relational view. Problem

Am I missing something?

like image 605
shakthi Avatar asked Oct 02 '22 07:10

shakthi


1 Answers

This is not actually a solution, but since I cannot comment on posts yet, I'll add a few comments that might help.

I've faced this same issue and the critical parameters seem to be the following:

  1. Case insensitive operating system (in my case windows)
  2. Mixed-case table names (e.g. "TableName")

I've been using Mixed-case table names successfully in Linux, but in Windows something seems to go really wrong with phpMyAdmin.

I bet your table names are mixed-case. Try creating a test table yourself, with a fully lowercase name, and check if you see the "Foreign Key Relations" options of phpMyAdmin.

If you do, then we've found the source of the problem and we're just left with finding a solution or workaround for it :)

ps: More on case-sensitivity and mysql, without any hints about phpMyAdmins view on all of this, can be found here:

http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html

This IS the solution. Renaming table name 'myTable' to 'my_table' solves the problem. Renaming table

like image 118
Kostas Filios Avatar answered Oct 10 '22 03:10

Kostas Filios