Enable LOAD DATA LOCAL INFILE in MySQL
Problem:
How to enable LOAD DATA LOCAL INFILE in the MySQL configuration file (my.cnf) for MySQL 5.5 on Ubuntu 12 LTS.
Solution:
To enable LOAD DATA LOCAL INFILE, you need to add the following option to the [mysql] section of your my.cnf file:
local-infile=1
Alternatively, you can call the MySQL client with the --local-infile option:
mysql --local-infile -uroot -pyourpwd yourdbname
You can also set the global variable at runtime with the following query:
SET GLOBAL local_infile=ON;
Additional Note:
Ensure that the local-infile parameter is also defined in the [mysqld] section of the my.cnf file to enable the "local infile" feature server-side. This restriction is in place for security reasons.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3