Enable Data Load Local InFile

We were getting below error at the time of loading data into MySQL. 

Error: Programming Error: 3948 (42000): Loading local data is disabled; this must be enabled on both the client and server sides.

Solution: 

Check the status of local_infile variable in MySQL…

> show variables like ‘%local%’;

+—————+——-+

| Variable_name | Value |

+—————+——-+

| local_infile  | OFF    |

+—————+——-+

In our care it was off. We solved this problem with the MySQL terminal command…

> SET GLOBAL local_infile = true;

Check the status now..

> show variables like ‘%local%’;

+—————+——-+

| Variable_name | Value |

+—————+——-+

| local_infile  | ON   |

+—————+——-+


Posted

in

, , ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *