Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Posts
    6

    Question Unanswered: 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
    Join Date
    Jan 2004
    Posts
    1
    I've got the same problem. I wasn't able to find a topic that has something to do with this.

    Who can help me?

  3. #3
    Join Date
    Aug 2009
    Posts
    1
    I also have the same problem. I managed to fix $cfg['Servers'][$i]['relation'] ... not OK [ Documentation ]
    General relation features: Disabled
    by introducing the name of all my tables one by one to the strings like this:
    $cfg['Servers'][$i]['pmadb'] = 'myDataBaseName';
    $cfg['Servers'][$i]['relation'] = 'Addresses';
    $cfg['Servers'][$i]['relation'] = 'Contracts';
    and so on for all tables.......

    But doing the same with other strings like:
    $cfg['Servers'][$i]['table_info'] = 'Users';
    $cfg['Servers'][$i]['table_info'] = 'Titles';
    $cfg['Servers'][$i]['table_info'] = 'Contracts';

    doesn't work. I still have the message:
    $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: Enabled
    Browser transformation: Disabled

    $cfg['Servers'][$i]['history'] ... not OK [ Documentation ]
    SQL history: Disabled

    $cfg['Servers'][$i]['designer_coords'] ... not OK [ Documentation ]
    Designer: Disabled

    Can anybody help?

    Thanks, Alex

  4. #4
    Join Date
    Sep 2009
    Posts
    1
    Bonjour, had same problem fixed it:

    1) create user: pma psswd: pmapass (or different name if needed)

    2) Please look at your ./scripts/ directory, where you should find a file called create_tables.sql. (If you are using a Windows server, pay special attention to FAQ 1.23). It creates the database phpmyadmin

    2) GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
    GRANT SELECT (
    Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
    Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
    File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
    Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
    Execute_priv, Repl_slave_priv, Repl_client_priv
    ) ON mysql.user TO 'pma'@'localhost';
    GRANT SELECT ON mysql.db TO 'pma'@'localhost';
    GRANT SELECT ON mysql.host TO 'pma'@'localhost';
    GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
    ON mysql.tables_priv TO 'pma'@'localhost';

    3) GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';

    4)Be sure that pma user is granted on the 8 tables in the phpmyadmin database.

    4) After it, all exept designer_coords was ok. For designer_coords:
    Config - PmaWiki is
    said about 'designer_coords':

    "Table in which to store information for the designer feature. DEFAULT:
    'pma_designer_coords' "

    but

    if I use the setup script in http://your_host/path/to/phpMyAdmin/setup/
    that is mentioned in Quick Install - PmaWiki The
    default value for Designer table is said to be 'designer_coors'. If you
    don't pay close attention you could spend days looking for an error after
    realize taht it is only a matter of table name error.

    3) vi (linux!) the config.inc.php and update

    $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

    Hope it helps

Posting Permissions

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