mysql infile local,MySQL:启用LOAD DATA LOCAL INFILE
I'm running Mysql 5.5 on Ubuntu 12 LTS. How should I enable LOAD DATA LOCAL INFILE in my.cnf?
I've tried adding local-infile in my config at various places but I'm still getting the "The used command is not allowed with this MySQL version"
解決方案
From the MySQL 5.5 manual page:
LOCAL works only if your server and your client both have been
configured to permit it. For example, if mysqld was started with
--local-infile=0, LOCAL does not work. See Section 6.1.6, “Security Issues with LOAD DATA LOCAL”.
You should set the option:
local-infile=1
into your [mysql] entry of my.cnf file or call mysql client with the --local-infile option:
mysql --local-infile -uroot -pyourpwd yourdbname
You have to be sure that the same parameter is defined into your [mysqld] section too to enable the "local infile" feature server side.
It's a security restriction.
總結
以上是生活随笔為你收集整理的mysql infile local,MySQL:启用LOAD DATA LOCAL INFILE的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: matlab simulink 视频,使
- 下一篇: php 获取汉字,php 获取汉字长度