(本文仅供参考)

问题说明

      通过数据源中的Excel文件,将Excel中的数据导入到MySQL中,报 Loading local data is disabled; this must be enabled on both the client and server sides 或者是 The used command is not allowed with this MySQL version 的错误

      

      

解决方案

      此问题是因为MySQL那边限制了加载本地文件,首先参考此链接:https://www.it610.com/article/1281242560890683392.htm 使用show variables like 'local_infile'; 命令查看MySQL的 local_infile是否为OFF,若为OFF,则需要通过set global local_infile=on 的命令启用服务端加载本地文件功能,同时在数据源链接中添加allowLoadLocalInfile=true参数启用客户端加载本地文件功能,都配置好后再加载Excel文件即可。