我在 Ubuntu 12 LTS 上运行 Mysql 5.5.我应该如何在 my.cnf 中启用 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?
我已经尝试在我的配置中的各个地方添加 local-infile,但我仍然收到此 MySQL 版本不允许使用的命令"
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"
来自 MySQL 5.5 手册页:
From the MySQL 5.5 manual page:
LOCAL 仅在您的服务器和客户端都已配置为允许它.例如,如果 mysqld 以--local-infile=0, LOCAL 不起作用.请参见第 6.1.6 节LOAD DATA LOCAL 的安全问题".
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".
您应该设置选项:
local-infile=1
进入 my.cnf 文件的 [mysql] 条目或使用 --local-infile 选项调用 mysql 客户端:
into your [mysql] entry of my.cnf file or call mysql client with the --local-infile option:
mysql --local-infile -uroot -pyourpwd yourdbname
您必须确保在您的 [mysqld] 部分中也定义了相同的参数,以启用本地 infile"功能服务器端.
You have to be sure that the same parameter is defined into your [mysqld] section too to enable the "local infile" feature server side.
这是一个安全限制.
这篇关于MySQL:启用 LOAD DATA LOCAL INFILE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
使用 SparkSQL 删除 MySQL 表Dropping MySQL table with SparkSQL(使用 SparkSQL 删除 MySQL 表)
如何有效地使用窗口函数根据 N 个先前值来决定How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函数根据
Spark SQL/Hive 查询永远需要加入Spark SQL/Hive Query Takes Forever With Join(Spark SQL/Hive 查询永远需要加入)
在“GROUP BY"中重用选择表达式的结果;条款reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用选择表达式的结果;条款?)
Pyspark DataFrameWriter jdbc 函数的 ignore 选项是忽略整Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函数的 ig
在 Spark 中找不到适合 jdbc 的驱动程序No suitable driver found for jdbc in Spark(在 Spark 中找不到适合 jdbc 的驱动程序)