Guldasta (A bouquet of flowers)

… because life is about varied experiences

  • Subscribe

  • Blog Stats

    • 37,703 hits
  • Disclaimer

    All which I express here are my independent views/opinions and are not necessarily influenced by any organization I work/correspond with.

Foreign Key in phpMyAdmin (Xampp)

Posted by imdad on July 24, 2008

The following steps are required for you to be able to add foreign keys using phpadmin (in xampp).

  1. Select any table and go to operations tab, if InnoDB is listed under storage engine drop down menu then jump to step 5.
  2. So InnoDB is disabled in mysql engine, edit the \xampp\mysql\bi\my.cnf file and remove the hashes that are required to enable InnoDB (its self explanatory).
  3. Add a line in the above file, default_storage_engine=InnoDB (This makes InnoDB the default storage engine).
  4. Restart mysql from the xampp control panel or from MS services.
  5. Make sure, both PARENT and CHILD tables are of storage type InnoDB.
  6. REFERENCED key (in parent) should be primary and REFERENCING key (in child) should be index.
  7. In the CHILD table’s structure view, click on the link ‘relations view’ (it lies above ‘add fields’).
  8. In the row corresponding to the REFERENCING key, select the REFERENCED key from the second column drop box.
  9. Click go .. you’ll see that the required query is executed.
  10. For storage type information go here.

    Advertisements

28 Responses to “Foreign Key in phpMyAdmin (Xampp)”

  1. Nithin said

    That was useful, thanks:)

  2. ammu said

    i would be better if it was explained with an example

  3. imdad said

    thanks for u comments

    @ammu .. i agree .. i will try to put in some for other help stuffs in future

  4. storm said

    Just what I needed. Thanks!

  5. THANKS said

    great instuctions. Thanks!

  6. Brian said

    Thank you very much!

  7. Will said

    Awesome. Exactly what I needed to know.

    Thank you!

  8. terima kasih saudara

  9. snowflake said

    Thank you so so much…i ve been searching for that for a while…

  10. Adam said

    Fantastic just want I wanted!

  11. Kevin Korb said

    Thanks!

    Learned something new.

  12. cagdas said

    beautiful article

    thanks!

  13. kslacker said

    Thanks for this. It was exactly what I needed.

    Note: The general steps work on linux based databases as well.

  14. Surendra said

    Thanks… cool stuff..

  15. […] suryapasupathi PhpMyAdmin PhpMyAdmin Leave a comment Foreign Key in phpMyAdminย (Xampp) […]

  16. Andy said

    Very useful and worked perfect for me in phpmyadmin 3.2.4

  17. samar nabil said

    Thanks alot .. it really helped me ๐Ÿ™‚

  18. Sadhbh said

    That helped me out a lot – thanks a million!

  19. Anony Mouse said

    Shit don’t work for me. Something about check data type

  20. Speel Tyd said

    How do you delete the foreign key?

  21. srikanta said

    thanks dude ๐Ÿ™‚

  22. edith said

    tried changing mine but the mysql service wont start again

  23. swellendam accommodation…

    […]Foreign Key in phpMyAdmin (Xampp) « Guldasta (A bouquet of flowers)[…]…

  24. outlook festival 2011 moat stage…

    […]Foreign Key in phpMyAdmin (Xampp) « Guldasta (A bouquet of flowers)[…]…

  25. Prestashop Themes…

    […]Foreign Key in phpMyAdmin (Xampp) « Guldasta (A bouquet of flowers)[…]…

  26. Spawnthing said

    snapshots perhaps? ๐Ÿ˜€

    nevertheless good tutorial. Thanks ๐Ÿ™‚

  27. anjukam said

    i am not able to understand please clearly explain the term how to activate the foreign key in xampp environment

  28. Praveen Kumar said

    thank you so much ๐Ÿ™‚ it helped my project ๐Ÿ™‚

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: