Table Exsists Already Error on Importing in localhost
Posted by: allendover1 (---.dhcp.sghl.ga.charter.com)
Date: August 30, 2017 05:39AM

I am running the latest wampserver version out with the core php, mysql and apache that is installed with it.

I can't ever seem to get a db in sql format in localhost phpmyadmin to import at all. I always get the error above thrown at me. Table Exsist Already, then the import just fails and stops. This happens on a number of tables. Before attempting to import I clear the folder of anything in it, so there are no tables to start with.

Why is this happening? I have been trying all day to figure out a fix for this. I can however import on my live server and it works. I can't however on localhost. Which tells me there is a setting in wampserver that can be changed maybe? Or I am doing something totally wrong. I don't know sql much at all.

Please help, any hints would be very welcomed right now. This has got to be simpler than this.

Allen

Options: ReplyQuote
Re: Table Exsists Already Error on Importing in localhost
Posted by: Otomatic (Moderator)
Date: August 30, 2017 09:16AM

Hi,

It is not Wampserver problem.
The export of your tables is done badly.
Before you want to create a table, you must check whether it already exists or not.
It is the export parameters of PhpMyAdmin that must be modified.

In the SQL export file, you MUST have, for each table:
DROP TABLE IF EXISTS `mytable1`;
CREATE TABLE IF NOT EXISTS `mytable1` (
....
> Before attempting to import I clear the folder of anything in it, so there are no tables to start with.
WHAT FOLDER ?

And, please: READ (and answer) BEFORE YOU ASK A QUESTION

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.