When I type in the code into the Terminal it creates the Database but doesn\'t create the Table. When I type in use "locations" then "Show TABLES" it tells m
Here is a full answer, based off of @Honeyboy's comment.
In addition to needing to USE locations;
there are some other things to fix:
CREATE TABLE
statement and the LOAD DATA
statementLOAD DATA
statement didn't ignore the header row of your tab delimited file.mysql -u root --password=password -e \
'CREATE DATABASE locations; \
USE locations; \
CREATE TABLE location_T (number1 INT NOT NULL, \
number2 INT NOT NULL, \
number3 INT NOT NULL, \
names VARCHAR(100) NOT NULL,PRIMARY KEY (number1)); \
LOAD DATA LOCAL INFILE "locations.csv" \
INTO TABLE location_T FIELDS TERMINATED by "\t" \
ENCLOSED BY "\"" LINES TERMINATED BY "\n" IGNORE 1 LINES \
(number1,number2,number3,names)'