Mysql duplicate foreign key constraint
<p>When I try to import a database I get this error</p>

<pre><code>SQL query:
ALTER TABLE `bid`
ADD CONSTRAINT `bid_ibfk_4` FOREIGN KEY (`auction_contact_id`) REFERENCES `auction_contact` (`auction_contact_id`),
ADD CONSTRAINT `bid_ibfk_3` FOREIGN KEY (`car_id`) REFERENCES `car` (`car_id`)

MySQL said: Documentation
#1826 - Duplicate foreign key constraint name 'projekt_classics/bid_ibfk_3'
</code></pre>

<p>Looking at all the foreign keys I get this as a result</p>

<pre><code>select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_TYPE = 'FOREIGN KEY' 
</code></pre>

<p>result</p>

<pre><code>def     projekt_classics    bid_ibfk_2      projekt_classics    bid     FOREIGN KEY
def     projekt_classics    bid_ibfk_3      projekt_classics    bid     FOREIGN KEY
def     projekt_classics    car_ibfk_1      projekt_classics    car     FOREIGN KEY
def     projekt_classics    car_ibfk_3      projekt_classics    car     FOREIGN KEY
def     projekt_classics    car_ibfk_4      projekt_classics    car     FOREIGN KEY
def     projekt_classics    car_brand_ibfk_1    projekt_classics    car_brand   FOREIGN KEY
</code></pre>

<p>searching into the sql the <code>bid_ibfk_3</code> constraint shows only 1 time.
All the data is in the imported database but I wonder how I can avoid this error.</p>

<p><strong>EDIT:</strong>
First dropping all the tables runs the query without problems.
I export my database using PHPmyadmin.
I guess the error was because of the foreign key constraint not yet deleted before trying to create it again.</p>