I have two huge databases in both formats CSV & XML, and I want to import to MySQL the databases.
I tried to used : LOAD DATA INFILE, but I receive this error message :
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1
MySQL Version : 5.1.56-log
I tried without any success to use PHP to convert XML to array then Insert line by line.
EDIT :
I used this query as root to import XML to MySQL :
LOAD XML LOCAL FILE ‘/home/floupie/public_html/All.xml’ INTO TABLE k_logs;
This is the appropriate syntax for a csv load.
This is the appropriate syntax for an xml load.