0

MYSQL infile settings are updated to 'ON' state in config file, and verified via the show variable command.

show global variables like 'local_infile';

Variable_name|Value|
-------------|-----|
local_infile |ON   |

I am able to load data from client machine using the below sql code.

LOAD DATA local INFILE 'D:/test.csv'
INTO TABLE testtable

But when I try to run the same code in my MYSQL server/machine it throws the error as below:

SQL Error [3948] [42000]: Loading local data is disabled; this must be enabled on both the client and server sides

How can I load files from client as well as within server too ? Is it a config issue or does user need some extra rights.

surpavan
  • 1,372
  • 7
  • 34
  • 66
  • Change your server config - `local-infile=1` – symcbean Jan 22 '21 at 19:31
  • @symcbean - config file is already with local-infile=1 in client section and mysqld section. Same is also visible in show variable command for local_infile as 'ON' – surpavan Jan 22 '21 at 19:32
  • This might help: [https://stackoverflow.com/questions/59993844/error-loading-local-data-is-disabled-this-must-be-enabled-on-both-the-client](https://stackoverflow.com/questions/59993844/error-loading-local-data-is-disabled-this-must-be-enabled-on-both-the-client) – Rob Moll Jan 22 '21 at 19:37
  • @RobMoll - Thank you, But I am able to load the as root user, but the non-root user is only able to load from client and not from server. Most of the actions given in the suggested link are reviewed/tried. – surpavan Jan 22 '21 at 19:43
  • If you haven't already, I would run `SET GLOBAL local_infile = true;` on the "MYSQL server/machine" (from the MySQL command line of course). – Rob Moll Jan 22 '21 at 19:51
  • focus on the client side `mysql --local_infile=1` there local_infile needs to be enabled as part of the client connection. – danblack Jan 23 '21 at 01:37
  • @danblack - client side uses connection DBEAVER IDE and same ide and config is used in server side as well. But it works on client but not on server. Again, I use root login it works. :( – surpavan Jan 23 '21 at 10:55

0 Answers0