3

I have 4 csv files that I want to import into my AWS mysql database.

I am trying to use the following command from a windows machine:

"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqlimport.exe" -h myhostname.amazonaws.com -P 3306 -u admin -pmypassword --local --fields-terminated-by=, --lines-terminated-by="\r\n" ticketsdb tickets "Data_2014_1.csv"

The response that I get is this:

mysqlimport: [Warning] Using a password on the command line interface can be insecure.
mysqlimport: Error: 2, File 'tickets' not found (Errcode: 2 - No such file or directory), when using table: tickets
4

1 回答 1

6

Do you actually have a file named "tickets" that you are trying to import? It sort of looks like you are trying to pass in a table name. Based on the documentation, I think you need to rename Data_2014_1.csv to tickets.csv and then run the following command:

"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqlimport.exe" -h myhostname.amazonaws.com -P 3306 -u admin -pmypassword --local --fields-terminated-by=, --lines-terminated-by="\r\n" ticketsdb tickets.csv

于 2016-01-19T22:17:39.400 回答