distal-attribute
distal-attribute
distal-attribute
distal-attribute

Simple import not happening

ultimamedia posted 2 years ago in General
Hi all i want to import a text or csv file using "import" on heidisql but the database im importing too is blank, so it wont let me do it without a table, why cant i just copy/paste SQL and run query like you can do in phpmyadmin? its extremely frustrating, its taken me an hour so far!
please help!
ansgar posted 2 years ago
A CSV file does not contain structure, only data. So, you need to create a table before you can import a file into it. Makes sense, doesn't it?
ultimamedia posted 2 years ago
Hi Anse, thank you for your response is there anyway of just copying and pasting an SQL dump into a fresh database? just like you can in phpmyadmin? my database has about 700 tables so i cant build every single table!
ansgar posted 2 years ago

ultimamedia wrote: why cant i just copy/paste SQL and run query like you can do in phpmyadmin? its extremely frustrating, its taken me an hour so far!



Well, you can. SQL is not the problem, just load or paste some SQL queries into the query tab and press the "Execute" button (F9). But you said you have a CSV file, not an SQL file, so I'm confused now.
ultimamedia posted 2 years ago
yes i have done that so i have one tab that has my empty database and another tab which has my SQL dump in it - how do i get the SQL dump into my database!?

ultimamedia posted 2 years ago
ok ive done that but it keeps finding small errors, anyway to bypass them
ansgar posted 2 years ago
And what are these "small errors" ? Just post error messages here please.
ultimamedia posted 2 years ago
SQL Error (1062) Duplicate Entry '1 for key1

which want to overwrite and then it gives an error to an individual table but i cant post that until this first one is fixed
ultimamedia posted 2 years ago
second error attachedhttp://www.ultimadevelopments.info/oxford2012/heidisqlerror.png
ultimamedia posted 2 years ago
it says duplicates but the tables just are not posting into the database

ansgar posted 2 years ago
* "Duplicate Entry": You have a unique or primary key in that table and the script contains more than 1 row with the same value ("1" in your case)
* "USING BTREE" is not supported by MySQL 5.0 and older. See here, or just remove the "USING BTREE" from your script.

I guess you are trying to run a script from a 5.5 server onto an older server?

Please login to leave a reply, or register at first.