Re: MySQL Error 1366

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



elk dolk wrote:
Hi All,

I want to load data from dump file to MySQL table using LOAD DATA INFILE but there is Error 1366 :

mysql> LOAD DATA
    -> INFILE 'D:/SITE/SOMETABLE.SQL'
    -> INTO TABLE SOMETABLE
    -> FIELDS TERMINATED BY ','
    -> OPTIONALLY ENCLOSED BY ''
    -> LINES TERMINATED BY ')';
ERROR 1366 (HY000): Incorrect integer value:  '--MySQL dump 10.10
--
--S' for column 'ID' at row 1

LOAD DATA INFILE imports a CSV like file, it can't contain create table statements or insert statements.

See the documentation: http://dev.mysql.com/doc/refman/4.1/en/load-data.html


If you have a script with create table & insert statements, use source:

source  (\.)    Execute a SQL script file. Takes a file name as an argument.

So

\. filename

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux