1.进入mysql查看secure_file_prive的值

$mysql -u root -p

mysql>SHOW VARIABLES LIKE "secure_file_priv";

secure_file_prive=null   -- 限制mysqld 不允许导入导出

secure_file_priv=/tmp/   -- 限制mysqld的导入导出只能发生在/tmp/目录下

secure_file_priv=' '         -- 不对mysqld 的导入 导出做限制

2.更改secure_file_pri的值

/usr/local/mysql/support-files中的my-default.cnf配置文件,就把它复制到/private/etc中,重命名为“my.cnf”,并加入secure_file_priv='',重启mysql服务器即可。

3.导入csv文件

-- sql导入csv文件 
load data local infile '/Users/jojo/dumps/train.csv' --文件目录
into table new_table -- 这里导入csv会出错,具体解决方法见"问题解决" 
fields terminated by','optionally enclosed by '"' escaped by '"' 
-- 字段之间以逗号分隔,字符串以半角双引号包围,字符串本身的双引号用两个双引号表示 
lines terminated by'\r\n' -- 数据行之间以\r\n分隔

4.导出csv文件

select * from table_name
into outfile 'C:/ProgramData/MySQL/MySQL Server 5.7/xx.csv'
FIELDS TERMINATED BY ','   
OPTIONALLY ENCLOSED BY '"'   
LINES TERMINATED BY '/n'

mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option解决办法的更多相关文章

  1. csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option 解决方法【转】

    解决方法: 1.进入mysql查看secure_file_prive的值 mysql>SHOW VARIABLES LIKE "secure_file_priv"; secu ...

  2. csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option

    解决方法: 1.进入mysql查看secure_file_prive的值 mysql>SHOW VARIABLES LIKE "secure_file_priv"; secu ...

  3. Mac上csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option解决办法

    1.进入mysql查看secure_file_prive的值 $mysql -u root -p mysql>SHOW VARIABLES LIKE "secure_file_priv ...

  4. CodeSign error: code signing is required for product type Application in SDK iOS XXX的解决办法

    转自:http://www.tuicool.com/articles/jYRNbm 在真机测试的时候往往会突然出现这样一个错误,code signing is required for product ...

  5. [Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement]错误解决

    1.配置文件中将这行注销“secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.7/Uploads" ”:很多人添加权限依然不 ...

  6. MySQL使用root用户授权出现错误ERROR 1045 (28000) at line 2: Access denied for user 'root'@'%' (using password: YES)解决办法

    参考:https://blog.csdn.net/open_data/article/details/42873827 使用MySQL的root用户登录出现错误提示 ERROR 1045 (28000 ...

  7. flume-ng version出现错误Error: Could not find or load main class org.apache.flume.tools.GetJavaPrope的解决办法

    错误: 找不到或无法加载主类 org.apache.flume.tools.GetJavaProperty或者Error: Could not find or load main class org. ...

  8. Mysql Update更新错误 Error Code:1175

    Mysql 5.7,默认执行 update 语句时遇到错误提示: Error Code: 1175. You are using safe update mode and you tried to u ...

  9. MySQL中执行sql语句错误 Error Code: 1093. You can't specify target table 'car' for update in FROM clause

    MySQL中执行sql语句错误 Error Code: 1093. You can't specify target table 'car' for update in FROM clause 201 ...

随机推荐

  1. 问题root@localhost's password:localhost:permission denied,please try again

    转载:https://www.cnblogs.com/hmy-blog/p/6500909.html 经过试验,上述方法在我的电脑中没有成功. 1.安装 open ssh:sudo apt-get i ...

  2. linux文件结构---转发

    linux各文件夹的作用---转载   linux下的文件结构,看看每个文件夹都是干吗用的/bin 二进制可执行命令 /dev 设备特殊文件 /etc 系统管理和配置文件 /etc/rc.d 启动的配 ...

  3. Java泛型(5):擦除与补偿

    先看一个例子: Class<?> c1 = new ArrayList<String>().getClass(); Class<?> c2 = new ArrayL ...

  4. RocketMQ之四:RocketMq事务消息

    事务消息 通过消息的异步事务,可以保证本地事务和消息发送同时执行成功或失败,从而保证了数据的最终一致性. 发送端执行如下几步: 发送prepare消息,该消息对Consumer不可见 执行本地事务(如 ...

  5. Django-DRF(1)

    一. WEB应用模式 在开发Web应用中,有两种应用模式: 1. 前后端不分离 2. 前后端分离 二. API接口 为了在团队内部形成共识.防止个人习惯差异引起的混乱,我们需要找到一种大家都觉得很好的 ...

  6. CSRF类型

    按照请求类型来区分.分为:GET类型和POST类型 按照攻击类型分类,CSRF可分为:HTML CSRF攻击,JSOM HiJacking攻击和FIash CSRF攻击 HTML CSRF攻击 HTM ...

  7. 深入理解C语言-深入理解数组

    数组,作为C语言中常见的复杂数据类型,了解其本质有助于深入了解C语言 数组概念 元素类型角度:数组是相同类型的变量的有序集合测试指针变量占有内存空间大小 内存角度:联系的一大片内存空间 数组初始化 数 ...

  8. City Road

    题目描述 从前有一个叫做”H湖”的地方,”H湖”的居民生活在不同的小岛上,当他们想去其他的小岛时都要通过划小船或者小岛之间的桥来实现.现在政府想实现”H湖”的全畅通!(不一定有直接的桥相连,只要互相间 ...

  9. 前端控制台 JavaScript函数报错 SyntaxError: expected expression, got ';' SyntaxError: expected expression, got 'if'

    在火狐浏览器下调试时, 页面报错SyntaxError: expected expression, got ';'或者SyntaxError: expected expression, got 'if ...

  10. ioremap&buddy system

    生死契阔,与子成说,执子之手,与子携老 一.ioremap 1.参考: 理解 (1)http://www.linuxidc.com/Linux/2011-04/34295.htm 代码过程 (1)ht ...