3603
MariaDBERRORCommonAccess ControlHIGH confidence

LOAD DATA access denied for user

Production Risk

High — Data load fails; bulk import pipelines may be disrupted.

How to reproduce
trigger — this will error
trigger — this will error
LOAD DATA INFILE '/var/lib/mysql-files/data.csv' INTO TABLE my_table;

expected output

ERROR 3603 (HY000): Access denied for user 'user'@'%' to LOAD DATA.

Fix 1

Grant FILE privilege

Grant FILE privilege
GRANT FILE ON *.* TO 'user'@'%';

Why this works

Allows the user to read files from the server filesystem.

Fix 2

Use LOCAL loading

Use LOCAL loading
LOAD DATA LOCAL INFILE '/path/to/data.csv' INTO TABLE my_table;

Why this works

Loads from the client side, bypassing server FILE privilege requirement.

What not to do

Version notes

Sources
Official documentation ↗

MySQL 8.0 — 3603 ER_LOAD_ACCESS_DENIED

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors