Nicole Stles
Nicole Stles

Reputation: 41

SQL Error 13000 HY000

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

Answers (2)

LONG
LONG

Reputation: 4620

Change the data type of the column to nvarchar(..), then you will not be bothered by the code page

Upvotes: 0

jfatal
jfatal

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

Related Questions