项目场景:
1. 将.csv文件import到数据库里,出错:
The MySQL server is running with the --secure-file-priv option so it cannot execute this statement.
2. 原因是secure-file-priv设置的为NULL——表示限制mysql 不允许导入或者导出。指令:SHOW VARIABLES LIKE "secure_file_priv";
可以看当前secure-file-priv值:
问题描述:
1. 按网上修改方法,修改mysql目录下的my.ini文件;
2. 在my.ini文件的[mysqld]内添加secure_file_priv =
,修改完,ANSI编码格式也正确,mysql却不能正常启动:
解决方案:
在my.ini文件的[mysqld]内添加时,secure_file_priv =
等号后面加一个空格即可:
在网上没看到有人注意提醒这一点,所以写下来。