1290 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
1.CSV文件导入到mysql数据库报错
因为此处为NULL 需要进行设置为空
原因分析:mysql文件的导入和导出路径有默认的设置,即 secure-file-priv,当传入或传出的csv文件路径与默认的路径冲突时就会报错。
在my.cnf中添加
- secure-file-priv=""
- 此处添加之后,一定要重启mysql服务生效
- 在控制台输入
- 此时,显示的为空,就说明我们修改成功