From the course: Learning phpMyAdmin
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Removing a foreign key constraint
We've added a foreign key constraint to the cars and makes tables in the up and running database. But let's say that you discover that your remote server doesn't support InnoDB. When testing locally, you should use only storage engines that are supported by your remote server. Otherwise, you'll have problems trying to import your structure and data into the remote server. But before you can convert your tables back to MyISAM, you must first remove any foreign key constraints. But let's see what happens if you try to change to MyISAM without first doing so. Now I'm going to go to the makes table, so that would be Structure, then Operations, and other Table options. Storage engine is currently InnoDB. Change that to MyISAM, and then click Go at the bottom of the panel. And we get an error. "My SQL said: Cannot delete or update a parent row: a foreign key constraint fails." So you simply can't do it. Let's dismiss that. We need to get rid of that foreign key constraint. And foreign key…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.