MySQL Forums
Forum List  »  Newbie

Re: Trouble Loading from CSV Files
Posted by: Brian Antos
Date: February 22, 2021 07:09PM

I finally did. (Some brief background: I'm new to MySQL and databases in general, but decent with computers.) Apparently the "LOCAL" keyword was messing me up the most. But I only used it because that was exactly how the MySQL tutorial did it:
https://dev.mysql.com/doc/refman/8.0/en/loading-tables.html

I had to use:
LOAD DATA INFILE '/var/lib/mysql-files/myfile.csv'
INTO TABLE mytable
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 LINES;

So, because I'm new to this, I'm actually not sure, when I log into MySQL from the terminal, am I logging into a client program? i.e. Not the server? I think things might be doubly confusing for me because I'm using it on my computer at home. It's not like I log into it remotely, so the server and client kind of seem the same to me.

Options: ReplyQuote


Subject
Written By
Posted
February 17, 2021 07:38PM
Re: Trouble Loading from CSV Files
February 22, 2021 07:09PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.