MySQL - Error Code: 2068. LOAD DATA LOCAL INFILE file request rejected due to restrictions on access

Viewed 22

I've run through a handful of similar questions but none of the solutions have allowed me to run this LOAD statement:

LOAD DATA LOCAL INFILE '/Users/TeronFunasaki/Desktop/Finance/chase_transaction_history/08_01_08_26_transactions_chase.csv'
IGNORE INTO TABLE transactions
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 1 ROWS
(@created_at, @posted_at, transactions, @category, @sub_category, amount, alert)
SET created_at = STR_TO_DATE(@created_at, '%Y-%m-%d'),
    posted_at = STR_TO_DATE(@posted_at, '%Y-%m-%d'),
    category = (SELECT id FROM category_index WHERE category = @category),
    sub_category = (SELECT id FROM sub_category_index WHERE sub_category = @sub_category);

The transactions table is setup as:

CREATE TABLE transactions (
    id INT AUTO_INCREMENT,
    created_at DATE NOT NULL,
    posted_at DATE NOT NULL,
    transactions VARCHAR(255) NOT NULL,
    category VARCHAR(255) NOT NULL,
    sub_category VARCHAR(255) NOT NULL
        DEFAULT '',
    amount INT NOT NULL,
    alert VARCHAR(255)
        DEFAULT '',
    PRIMARY KEY (id)
);

and when I run the query the following error message pops up

Error Code: 2068. LOAD DATA LOCAL INFILE file request rejected due to restrictions on access.

I've already toggled

OPT_LOCAL_INFILE=1
set global local_infile=1

which leads me to believe this may be an issue with my user privileges, has anyone encountered a similar problem?

0 Answers
Related