load data infile referencing one path while mariadb uses a totally different path and can't find input file
hi. I'm a beginner at this point. Decided to try importing a text file. I modified beginner documentation on following page, to suit. https://mariadb.com/kb/en/importing-data-into-mariadb/
LOAD DATA INFILE 'C:\Users\Firstname Lastname\Documents\_Technical\Maria DB\my data\id-email.txt' INTO TABLE id_email FIELDS TERMINATED BY '|';
I get a file not found error, File 'C:\Program Files\MariaDB 10.5\data\UsersFirstname LastnameDocuments\_TechnicalMaria DBmy dataid-email.txt' not found
I protest, "But this isn't what I wrote!" Please point out what I'm I doing wrong. Thanks,
Answer Answered by Kevin Low in this comment.
answering my own question, here.
Mariadb sets the data path in my.ini (in windows), so when you enter the argument to INFILE, it is looking for a file name located in the folder the data path is set to. That's why I was losing my backslashes.
1. put the data file into the data folder. 2. use the data file name alone as argument to the INFILE keyword.
Is there a way to mark this question "answered"?