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

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.1 32 bit - Apache 2.4.29 - PHP 7.1.11/7.0.25/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
Wampserver 3.1.1 64 bit - Apache 2.4.29 - PHP 7.1.11/7.0.25/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
PhPMyAdmin 4.7.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.