SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member whiter's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Getting Foreign Key relationships etc. in phpMyAdmin / MySQL

    I am trying to create a new database, which will *naturally* be relational, and so therefore will require Foreign Keys etc..

    I see that phpMyAdmin is primitive enough not to support Foreign Keys relationships properly etc. unless it's specially configured to do so.

    I've just spent the last hour going through the documentation; and
    -- CREATED the 'phpmyadmin' database and all its necessary tables;
    -- APPLIED the configuration changes to {config.inc.php}; and
    -- then stopped/restarted Apache. (even rebooted since!)
    AND IT STILL DOESN'T WORK!

    I am connecting to my localserver database, using the 'root' user id; so I
    take it I shouldn't have a security problem. So what *IS* my problem with this??

    The lines in {config.inc.php} I changed are:-
    ----------------------------------------------------------------
    $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
    $cfg['Servers'][$i]['bookmarktable'] = 'PMA_bookmark';
    $cfg['Servers'][$i]['relation'] = 'PMA_relation';
    $cfg['Servers'][$i]['table_info'] = 'PMA_table_info';
    $cfg['Servers'][$i]['table_coords'] = 'PMA_table_coords';
    $cfg['Servers'][$i]['pdf_pages'] = 'PMA_pdf_pages';
    $cfg['Servers'][$i]['column_info'] = 'PMA_column_info';
    $cfg['Servers'][$i]['history'] = 'PMA_history';
    ----------------------------------------------------------------

    ** BUT --- IT STILL DOESN'T WORK **

    Anybody know why?


    I am getting the following error details:-
    ----------------------------------------------------------------
    $cfg['Servers'][$i]['pmadb'] ... OK

    $cfg['Servers'][$i]['relation'] ... not OK [ Documentation ]
    General relation features: Disabled

    $cfg['Servers'][$i]['table_info'] ... not OK [ Documentation ]
    Display Features: Disabled

    $cfg['Servers'][$i]['table_coords'] ... not OK [ Documentation ]
    $cfg['Servers'][$i]['pdf_pages'] ... not OK [ Documentation ]
    Creation of PDFs: Disabled

    $cfg['Servers'][$i]['column_info'] ... not OK [ Documentation ]
    Displaying Column Comments: Disabled
    Bookmarked SQL-query: Disabled
    MIME ... not OK [ Documentation ]
    $cfg['Servers'][$i]['history'] ... not OK [ Documentation ]
    SQL-history: Disabled
    ----------------------------------------------------------------

    PS: All the tables have been created in the {phpMyAdmin} database by 'root', and I am using 'root' for all access (locally).

  2. #2
    SitePoint Enthusiast HogMan's Avatar
    Join Date
    Mar 2003
    Location
    Nebraska
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post some sql you are using to create the tables? Also, if trying to use foreign key contraints, you have to use InnoDB tables.

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    Palo Alto
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're trying to create foreign keys using phpmyadmin, I can't help you other than to say use the mysql command-line client. If you're trying to get info on foreign keys in an existing table, though....
    As far as I know, the only part of MySQL that supports foreign keys is the InnoDB layer. This means that the part of MySQL that returns information from a 'describe' command doesn't have a clue what foreign keys are, and therefore cannot tell you whether they exist. Someone please correct me if I'm wrong, but I think you're out of luck for now.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •