PhpMyAdmin export does not include PRIMARY KEY as mysqldump

phpMyAdmin/libraries/plugins/export/ExportSql.class.php

 

In the file, the code block starting with the below line needs to be skipped

if (preg_match(@CONSTRAINT|KEY@, $create_query)) {

The easiest way to do that is changing that line to

if (false && preg_match(@CONSTRAINT|KEY@, $create_query)) {