- Newest
- Most votes
- Most comments
I had a little trouble understanding how this example ever worked, but I think I understand after some research. If I read it correctly, there is a Linked Server from a Microsoft SQL Server to a MySQL Server. You then tell Microsoft SQL Server to pass the string "Load Data Local Infile" to the MySQL Server and execute it local to the MySQL Server. But the entire point of Load Data Local Infile is to read data from the client and send it to the server, so it can't be executed on the MySQL Server directly. BUT, a little searching around suggests that the ODBC driver can indeed intercept and execute this command locally.
Sooo, I think the problem is that you need to be setting ENABLE_LOCAL_INFILE = 1 on the client side of the ODBC connection from SQL Server to the RDS MySQL database. You can probably just add this to the connect string. See https://stackoverflow.com/questions/55058843/mysql-load-data-local-infile-not-working-after-driver-update-from-5-to-8 for more discussion.
Another thing to consider is that the ODBC driver used in the Microsoft SQL Server installation is a version that doesn't support ENABLE_LOCAL_INFILE. But before tackling if there is a way to update the driver, make sure the connection string is trying to enable local infile.
Relevant content
- asked 23 days ago
- asked 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago