Reputation: 41
use defpass;
create table creds (
entry_date DATE,
vendor VARCHAR(23),
username VARCHAR(13),
password VARCHAR(19),
comments VARCHAR(48)
);
load data local infile '/Users/baileystiles/Desktop/default-passwords.csv'
Into Table creds
fields terminated by ',';
SELECT STR_TO_DATE('11,3,13','%m,%d,%y');
Trying to load a csv file into my database and I get an error saying invalied uft8 character string 'backdoor'. The does have dates which need to be converted to strings well. Which I did with the STR_TO_DATE function
Upvotes: 0
Views: 155
Reputation: 4620
Change the data type of the column to nvarchar(..)
, then you will not be bothered by the code page
Upvotes: 0
Reputation: 253
Try using NVARCHAR:
use defpass;
create table creds (
entry_date DATE,
vendor NVARCHAR(23),
username NVARCHAR(13),
password NVARCHAR(19),
comments NVARCHAR(48)
);
load data local infile '/Users/baileystiles/Desktop/default-passwords.csv'
Into Table creds
fields terminated by ',';
Upvotes: 1