无法从XML加载:此MySQL版本不允许使用该命令

问题描述 投票:0回答:1

我在MYSQL Workbench中从XML加载记录时遇到了困难

load xml local infile 'records.xml'
into table Badges
rows identified by '<row>';

我一直收到错误:

Error Code: 1148. The used command is not allowed with this MySQL version   
0.00017 sec

我检查了SHOW VARIABLES WHERE Variable_name = 'local_infile';,它是ON。我也用SET GLOBAL local_infile = true;明确地设置了它。任何人都知道为什么会这样吗?我正在使用mysql 5.7.24

mysql mysql-workbench
1个回答
0
投票

见文档:

6.1.6 Security Issues with LOAD DATA LOCAL(适用于LOAD XML LOCAL)

...

如果禁用LOCAL功能,则无论是在服务器端还是客户端端,尝试发出LOAD DATA LOCAL语句的客户端都会收到以下错误消息:

ERROR 1148: The used command is not allowed with this MySQL version

尝试:

文件:/path/to/my.cnf

[mysql]
local-infile
© www.soinside.com 2019 - 2024. All rights reserved.