我正在尝试在 Amazon RDS 实例的 MySQL 表中添加数百个寄存器,当我这样做时:
LOAD DATA LOCAL INFILE '/home/user/file.csv'
INTO TABLE databasename.tablename
FIELDS TERMINATED BY ' ' LINES TERMINATED BY ',';
我收到此错误:
Error Code: 2. File '/home/user/file.csv' not found (Errcode: 2)
如果我尝试使用LOAD DATA INFILE而不是LOAD DATA LOCAL INFILE我得到:
Error Code: 1045. Access denied for user 'user'@'%' (using password: YES)
我正在使用 MySQL Workbench,但也从命令行尝试过。如何将本地 CSV 上传到该表中?