How to add a foreign key in MySQL on WAMPserver?

mysql, wamp, wampserver

Solution

Creating a foreign key constraint relies on your storage engine being set to something that can support it (such as InnoDB). In PHPMyAdmin, you can set this in "Operations" for the table with the "Storage Engine" option. Once that's complete:

- Make sure you've assigned an index to the column you'll be assigning a foreign key to.

- Click on "Relation view" under the table details on the "Structure" tab.

- Assign your foreign key constraint and decide on the actions for DELETE and UPDATE.

Problem

I can't figure how to indicate that a column is a foreign key in WAMPserver. I suppose I could write the MySQL query for that, but I would think that there is also a way to do that using the user interface (PHPMyAdmin)...?

Original source