Adding constraints in phpMyAdmin

Alex picture Alex · Feb 29, 2012 · Viewed 37.1k times · Source

I feel like I'm being stupid, but I can't find anywhere on the phpMyAdmin interface to add constraints to foreign keys e.g. CASCADE ON DELETE

I've looked for similar questions on here and on the phpMyAdmin wiki but I can't find anything about it.

I realise I could do this via the query interface, but I'd like to know how to do it through the graphical interface.

Answer

utsikko picture utsikko · Feb 29, 2012

First, you should have your storage engine as InnoDB. Then select a table and go to 'Structure' tab.

Under the table you will see 'Relation view', click it. From there you could add constraints.