c# 使用MySql的MySqlBulkCopy 出现异常 Loading local data is disabled; this must be enabled on both the client and server sides


解决方法:

设置客户端加载功能: set global local_infile = 1;

在客户端执行 set global local_infile = 1;

mysql> set global local_infile = 1;

查看结果

mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile';

 

服务端设置加载功能:

找到mysql 的安装路径打开my.ini 文件

在[mysql]和[mysqld]下加入local_infile = 1

 

 

注:

修改该文件的时候要 确保MySQL的Notifier退出;

保存文件时保证文件格式为ANSI编码格式;

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM