Loading data in MySql

When i am trying to load the data in mysql version 5.1.44-community wour MySql with command “. DefaultData_SETUP”

It shows following error

"Error 1064(42000) You have an error in your sql syntax: check the manual that correspond to your MySql server version for the right syntax to use at line 1 "

I have also pasted the SETUP file for convenience.

Thanks in advance…

CREATE DATABASE IF NOT EXISTS cellprofiler;
USE cellprofiler;

CREATE TABLE Per_Image (ImageNumber INTEGER PRIMARY KEY,
Image_FileName_OrigBlue VARCHAR(128),
Image_PathName_OrigBlue VARCHAR(128),
Image_Threshold_OrigThreshold_Nuclei FLOAT NOT NULL,
Image_Threshold_FinalThreshold_Nuclei FLOAT NOT NULL,
Image_Threshold_WeightedVariance_Nuclei FLOAT NOT NULL,
Image_Threshold_SumOfEntropies_Nuclei FLOAT NOT NULL,
Image_Count_Nuclei FLOAT NOT NULL,
Mean_Nuclei_Location_Center_X FLOAT NOT NULL,
Mean_Nuclei_Location_Center_Y FLOAT NOT NULL,
Mean_Nuclei_AreaShape_Area FLOAT NOT NULL,
Mean_Nuclei_AreaShape_Eccentricity FLOAT NOT NULL,
Mean_Nuclei_AreaShape_Solidity FLOAT NOT NULL,
Mean_Nuclei_AreaShape_Extent FLOAT NOT NULL,
Mean_Nuclei_AreaShape_EulerNumber FLOAT NOT NULL,
Mean_Nuclei_AreaShape_Perimeter FLOAT NOT NULL,
Mean_Nuclei_AreaShape_FormFactor FLOAT NOT NULL,
Mean_Nuclei_AreaShape_MajorAxisLength FLOAT NOT NULL,
Mean_Nuclei_AreaShape_MinorAxisLength FLOAT NOT NULL,
Mean_Nuclei_AreaShape_Orientation FLOAT NOT NULL,
Mean_Nuclei_Zernike_0_0 FLOAT NOT NULL,
Mean_Nuclei_Zernike_1_1 FLOAT NOT NULL,
Mean_Nuclei_Zernike_2_0 FLOAT NOT NULL,
Mean_Nuclei_Zernike_2_2 FLOAT NOT NULL,
Mean_Nuclei_Zernike_3_1 FLOAT NOT NULL,
Mean_Nuclei_Zernike_3_3 FLOAT NOT NULL,
Mean_Nuclei_Zernike_4_0 FLOAT NOT NULL,
Mean_Nuclei_Zernike_4_2 FLOAT NOT NULL,
Mean_Nuclei_Zernike_4_4 FLOAT NOT NULL,
Mean_Nuclei_Zernike_5_1 FLOAT NOT NULL,
Mean_Nuclei_Zernike_5_3 FLOAT NOT NULL,
Mean_Nuclei_Zernike_5_5 FLOAT NOT NULL,
Mean_Nuclei_Zernike_6_0 FLOAT NOT NULL,
Mean_Nuclei_Zernike_6_2 FLOAT NOT NULL,
Mean_Nuclei_Zernike_6_4 FLOAT NOT NULL,
Mean_Nuclei_Zernike_6_6 FLOAT NOT NULL,
Mean_Nuclei_Zernike_7_1 FLOAT NOT NULL,
Mean_Nuclei_Zernike_7_3 FLOAT NOT NULL,
Mean_Nuclei_Zernike_7_5 FLOAT NOT NULL,
Mean_Nuclei_Zernike_7_7 FLOAT NOT NULL,
Mean_Nuclei_Zernike_8_0 FLOAT NOT NULL,
Mean_Nuclei_Zernike_8_2 FLOAT NOT NULL,
Mean_Nuclei_Zernike_8_4 FLOAT NOT NULL,
Mean_Nuclei_Zernike_8_6 FLOAT NOT NULL,
Mean_Nuclei_Zernike_8_8 FLOAT NOT NULL,
Mean_Nuclei_Zernike_9_1 FLOAT NOT NULL,
Mean_Nuclei_Zernike_9_3 FLOAT NOT NULL,
Mean_Nuclei_Zernike_9_5 FLOAT NOT NULL,
Mean_Nuclei_Zernike_9_7 FLOAT NOT NULL,
Mean_Nuclei_Zernike_9_9 FLOAT NOT NULL,
Mean_Nuclei_Neighbors_NumberOfNeighbors_0 FLOAT NOT NULL,
Mean_Nuclei_Neighbors_PercentTouching_0 FLOAT NOT NULL,
Mean_Nuclei_Neighbors_FirstClosestObjectNumber_0 FLOAT NOT NULL,
Mean_Nuclei_Neighbors_FirstClosestXVector_0 FLOAT NOT NULL,
Mean_Nuclei_Neighbors_FirstClosestYVector_0 FLOAT NOT NULL,
Mean_Nuclei_Neighbors_SecondClosestObjectNumber_0 FLOAT NOT NULL,
Mean_Nuclei_Neighbors_SecondClosestXVector_0 FLOAT NOT NULL,
Mean_Nuclei_Neighbors_SecondClosestYVector_0 FLOAT NOT NULL,
Mean_Nuclei_Neighbors_AngleBetweenNeighbors_0 FLOAT NOT NULL,
Mean_Nuclei_Intensity_IntegratedIntensity_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_MeanIntensity_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_StdIntensity_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_MinIntensity_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_MaxIntensity_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_IntegratedIntensityEdge_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_MeanIntensityEdge_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_StdIntensityEdge_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_MinIntensityEdge_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_MaxIntensityEdge_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_MassDisplacement_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_LowerQuartileIntensity_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_MedianIntensity_OrigGray FLOAT NOT NULL,
Mean_Nuclei_Intensity_UpperQuartileIntensity_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Location_Center_X FLOAT NOT NULL,
StDev_Nuclei_Location_Center_Y FLOAT NOT NULL,
StDev_Nuclei_AreaShape_Area FLOAT NOT NULL,
StDev_Nuclei_AreaShape_Eccentricity FLOAT NOT NULL,
StDev_Nuclei_AreaShape_Solidity FLOAT NOT NULL,
StDev_Nuclei_AreaShape_Extent FLOAT NOT NULL,
StDev_Nuclei_AreaShape_EulerNumber FLOAT NOT NULL,
StDev_Nuclei_AreaShape_Perimeter FLOAT NOT NULL,
StDev_Nuclei_AreaShape_FormFactor FLOAT NOT NULL,
StDev_Nuclei_AreaShape_MajorAxisLength FLOAT NOT NULL,
StDev_Nuclei_AreaShape_MinorAxisLength FLOAT NOT NULL,
StDev_Nuclei_AreaShape_Orientation FLOAT NOT NULL,
StDev_Nuclei_Zernike_0_0 FLOAT NOT NULL,
StDev_Nuclei_Zernike_1_1 FLOAT NOT NULL,
StDev_Nuclei_Zernike_2_0 FLOAT NOT NULL,
StDev_Nuclei_Zernike_2_2 FLOAT NOT NULL,
StDev_Nuclei_Zernike_3_1 FLOAT NOT NULL,
StDev_Nuclei_Zernike_3_3 FLOAT NOT NULL,
StDev_Nuclei_Zernike_4_0 FLOAT NOT NULL,
StDev_Nuclei_Zernike_4_2 FLOAT NOT NULL,
StDev_Nuclei_Zernike_4_4 FLOAT NOT NULL,
StDev_Nuclei_Zernike_5_1 FLOAT NOT NULL,
StDev_Nuclei_Zernike_5_3 FLOAT NOT NULL,
StDev_Nuclei_Zernike_5_5 FLOAT NOT NULL,
StDev_Nuclei_Zernike_6_0 FLOAT NOT NULL,
StDev_Nuclei_Zernike_6_2 FLOAT NOT NULL,
StDev_Nuclei_Zernike_6_4 FLOAT NOT NULL,
StDev_Nuclei_Zernike_6_6 FLOAT NOT NULL,
StDev_Nuclei_Zernike_7_1 FLOAT NOT NULL,
StDev_Nuclei_Zernike_7_3 FLOAT NOT NULL,
StDev_Nuclei_Zernike_7_5 FLOAT NOT NULL,
StDev_Nuclei_Zernike_7_7 FLOAT NOT NULL,
StDev_Nuclei_Zernike_8_0 FLOAT NOT NULL,
StDev_Nuclei_Zernike_8_2 FLOAT NOT NULL,
StDev_Nuclei_Zernike_8_4 FLOAT NOT NULL,
StDev_Nuclei_Zernike_8_6 FLOAT NOT NULL,
StDev_Nuclei_Zernike_8_8 FLOAT NOT NULL,
StDev_Nuclei_Zernike_9_1 FLOAT NOT NULL,
StDev_Nuclei_Zernike_9_3 FLOAT NOT NULL,
StDev_Nuclei_Zernike_9_5 FLOAT NOT NULL,
StDev_Nuclei_Zernike_9_7 FLOAT NOT NULL,
StDev_Nuclei_Zernike_9_9 FLOAT NOT NULL,
StDev_Nuclei_Neighbors_NumberOfNeighbors_0 FLOAT NOT NULL,
StDev_Nuclei_Neighbors_PercentTouching_0 FLOAT NOT NULL,
StDev_Nuclei_Neighbors_FirstClosestObjectNumber_0 FLOAT NOT NULL,
StDev_Nuclei_Neighbors_FirstClosestXVector_0 FLOAT NOT NULL,
StDev_Nuclei_Neighbors_FirstClosestYVector_0 FLOAT NOT NULL,
StDev_Nuclei_Neighbors_SecondClosestObjectNumber_0 FLOAT NOT NULL,
StDev_Nuclei_Neighbors_SecondClosestXVector_0 FLOAT NOT NULL,
StDev_Nuclei_Neighbors_SecondClosestYVector_0 FLOAT NOT NULL,
StDev_Nuclei_Neighbors_AngleBetweenNeighbors_0 FLOAT NOT NULL,
StDev_Nuclei_Intensity_IntegratedIntensity_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_MeanIntensity_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_StdIntensity_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_MinIntensity_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_MaxIntensity_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_IntegratedIntensityEdge_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_MeanIntensityEdge_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_StdIntensityEdge_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_MinIntensityEdge_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_MaxIntensityEdge_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_MassDisplacement_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_LowerQuartileIntensity_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_MedianIntensity_OrigGray FLOAT NOT NULL,
StDev_Nuclei_Intensity_UpperQuartileIntensity_OrigGray FLOAT NOT NULL);

CREATE TABLE Per_Object(ImageNumber INTEGER,ObjectNumber INTEGER,
Nuclei_Location_Center_X FLOAT NOT NULL,
Nuclei_Location_Center_Y FLOAT NOT NULL,
Nuclei_AreaShape_Area FLOAT NOT NULL,
Nuclei_AreaShape_Eccentricity FLOAT NOT NULL,
Nuclei_AreaShape_Solidity FLOAT NOT NULL,
Nuclei_AreaShape_Extent FLOAT NOT NULL,
Nuclei_AreaShape_EulerNumber FLOAT NOT NULL,
Nuclei_AreaShape_Perimeter FLOAT NOT NULL,
Nuclei_AreaShape_FormFactor FLOAT NOT NULL,
Nuclei_AreaShape_MajorAxisLength FLOAT NOT NULL,
Nuclei_AreaShape_MinorAxisLength FLOAT NOT NULL,
Nuclei_AreaShape_Orientation FLOAT NOT NULL,
Nuclei_Zernike_0_0 FLOAT NOT NULL,
Nuclei_Zernike_1_1 FLOAT NOT NULL,
Nuclei_Zernike_2_0 FLOAT NOT NULL,
Nuclei_Zernike_2_2 FLOAT NOT NULL,
Nuclei_Zernike_3_1 FLOAT NOT NULL,
Nuclei_Zernike_3_3 FLOAT NOT NULL,
Nuclei_Zernike_4_0 FLOAT NOT NULL,
Nuclei_Zernike_4_2 FLOAT NOT NULL,
Nuclei_Zernike_4_4 FLOAT NOT NULL,
Nuclei_Zernike_5_1 FLOAT NOT NULL,
Nuclei_Zernike_5_3 FLOAT NOT NULL,
Nuclei_Zernike_5_5 FLOAT NOT NULL,
Nuclei_Zernike_6_0 FLOAT NOT NULL,
Nuclei_Zernike_6_2 FLOAT NOT NULL,
Nuclei_Zernike_6_4 FLOAT NOT NULL,
Nuclei_Zernike_6_6 FLOAT NOT NULL,
Nuclei_Zernike_7_1 FLOAT NOT NULL,
Nuclei_Zernike_7_3 FLOAT NOT NULL,
Nuclei_Zernike_7_5 FLOAT NOT NULL,
Nuclei_Zernike_7_7 FLOAT NOT NULL,
Nuclei_Zernike_8_0 FLOAT NOT NULL,
Nuclei_Zernike_8_2 FLOAT NOT NULL,
Nuclei_Zernike_8_4 FLOAT NOT NULL,
Nuclei_Zernike_8_6 FLOAT NOT NULL,
Nuclei_Zernike_8_8 FLOAT NOT NULL,
Nuclei_Zernike_9_1 FLOAT NOT NULL,
Nuclei_Zernike_9_3 FLOAT NOT NULL,
Nuclei_Zernike_9_5 FLOAT NOT NULL,
Nuclei_Zernike_9_7 FLOAT NOT NULL,
Nuclei_Zernike_9_9 FLOAT NOT NULL,
Nuclei_Neighbors_NumberOfNeighbors_0 FLOAT NOT NULL,
Nuclei_Neighbors_PercentTouching_0 FLOAT NOT NULL,
Nuclei_Neighbors_FirstClosestObjectNumber_0 FLOAT NOT NULL,
Nuclei_Neighbors_FirstClosestXVector_0 FLOAT NOT NULL,
Nuclei_Neighbors_FirstClosestYVector_0 FLOAT NOT NULL,
Nuclei_Neighbors_SecondClosestObjectNumber_0 FLOAT NOT NULL,
Nuclei_Neighbors_SecondClosestXVector_0 FLOAT NOT NULL,
Nuclei_Neighbors_SecondClosestYVector_0 FLOAT NOT NULL,
Nuclei_Neighbors_AngleBetweenNeighbors_0 FLOAT NOT NULL,
Nuclei_Intensity_IntegratedIntensity_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_MeanIntensity_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_StdIntensity_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_MinIntensity_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_MaxIntensity_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_IntegratedIntensityEdge_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_MeanIntensityEdge_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_StdIntensityEdge_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_MinIntensityEdge_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_MaxIntensityEdge_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_MassDisplacement_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_LowerQuartileIntensity_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_MedianIntensity_OrigGray FLOAT NOT NULL,
Nuclei_Intensity_UpperQuartileIntensity_OrigGray FLOAT NOT NULL,
PRIMARY KEY (ImageNumber, ObjectNumber));

LOAD DATA LOCAL INFILE ‘SQL_1_1_image.CSV’ REPLACE INTO TABLE Per_Image FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘"’ ESCAPED BY ‘’;
SHOW WARNINGS;
LOAD DATA LOCAL INFILE ‘SQL_1_1_object.CSV’ REPLACE INTO TABLE Per_Object FIELDS TERMINATED BY ‘,’;
SHOW WARNINGS;

I believe the problem is with line 1 (as the error statement says): “CREATE DATABASE IF NOT EXISTS”. It may be that the “IF NOT EXISTS” statement was implemented after the version of MySQL server that you are using. If you take out the “IF NOT EXISTS” portion, does it work?

Regards,
-Mark

Thanks Marks !

I tried it but it did not work. Actually the problem was with the command to load the data to MySql. One has to use / instead of \ in loading command.