

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How should I enable LOAD DATA LOCAL INFILE in my.cnf in MySQL?
We can enable it with the help of the SET command with GLOBAL. The first time, local infile will be off.
The following is the syntax.
mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile';
Here is the output.
+---------------+-------+ | Variable_name | Value | +---------------+-------+ | local_infile | OFF | +---------------+-------+ 1 row in set (0.01 sec)
We can enable the local infile with the help of ON or boolean value true or numeric value 1. The following is the syntax to enable the local infile.
mysql> SET GLOBAL local_infile = 'ON'; Query OK, 0 rows affected (0.00 sec) mysql> SET GLOBAL local_infile = 1; Query OK, 0 rows affected (0.00 sec) mysql> SET GLOBAL local_infile = true; Query OK, 0 rows affected (0.00 sec)
In MySQL version 8.0.12, let us check if it is ON or not.
mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile';
The following is the output.
+---------------+-------+ | Variable_name | Value | +---------------+-------+ | local_infile | ON | +---------------+-------+ 1 row in set (0.00 sec)
After restarting MySQL, it will set local infile to ON.
- Related Questions & Answers
- How should I manage my life?
- How should I store data into my Mysql database, what type should I assign to a column storing salt values?
- How can we MySQL LOAD DATA INFILE statement with ‘ENCLOSED BY’ option to import data from text file into MySQL table?
- How can we MySQL LOAD DATA INFILE statement with ‘FIELDS TERMINATED BY’ option to import data from text file into MySQL table?
- How can I install or enable innoDB in MySQL?
- How to import local json file data to my JavaScript variable?
- My girlfriend never appreciates me, what should I do?
- Should I always put my JavaScript file in the head tag of my HTML file?
- Should I include language="javascript" in my SCRIPT tags?
- In college, if I am being ragged by my seniors, whom should I complain?
- Being a girl should I give importance to my looks?
- What Should I Do If My IP Address Is Exposed?
- Should I include type=“text/javascript” in my SCRIPT tags?
- How can I enable MySQL slow query log without restarting MySQL?
- What is MySQL LOAD DATA statement?
Advertisements