Tuesday, October 13, 2015

LOAD DATA LOCAL INFILE Not Working

This is an Error that I made many times and cannot remember how to fix it, which in turn cost a lot of googling time.
The problem laid in the difference between Unix an Windows ....... Dont use "\r" when you are on windows Machine



LOAD DATA LOCAL INFILE 'd:/www/text.csv' INTO TABLE table
FIELDS TERMINATED BY ','
LINES TERMINATED BY "\n"
IGNORE 1 LINES

Please check connection uri string and try again red5 windows 7

JAVA_HOME environment variable not set! Take a look at the readme.
Press any key to continue . . .

When you see this error message ,That means your java directory is not set as a variable in the system Variables , to do so :
1. Go to control panel --> then to System and Security --> then to System
2. On the Left Panel click on Advanced System Settings.(New window will popup).
3.In the new Popped up window click on (Advanced) tab on the top then click "Environment Variables" at the bottom.(New window will popup).
4. in the new popped window under the lower table box click on NEW.
5. Enter the Variable Name as JAVA_HOME.
6.Enter  the Variable Value as C:\Progra~1\Java\jre7.