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. JPA,Hibernate,Spring Data JPA之间的关系

    什么么是JPA? 全称Java Persistence API(JAVA对象持久化API),可以通过注解或者XML描述[对象-关系表]之间的映射关系,并将实体对象持久化到数据库中. 为我们提供了: 1 ...

  2. 扩展:Zero Copy

  3. OpenCV画图(画OpenCV的标志)

    import numpy as np import cv2 img = np.ones((512, 512, 3), np.uint8)*255 # 画椭圆 # 图片 (圆心) (短轴长,长轴长),旋 ...

  4. IIS 7 实现http跳转https 重定向方法

    官网的域名申请了一个SSL加密,导致原来的http无法访问了,网上找了一下解决方案,https://www.cnblogs.com/wer-ltm/p/10190535.html  按照这个方法进行了 ...

  5. NFS PersistentVolume

    一.部署nfs服务端: k8s-master 节点上搭建了 NFS 服务器 (1)安装nfs服务: yum install -y nfs-utils rpcbind vim /etc/exports ...

  6. Django之contenttypes组件

    目录 一. 介绍 二. 应用场景 1. 表结构设计的演变 2. GenericForeignKey和GenericRelation 3. 测试 一. 介绍 Django包含一个contenttypes ...

  7. 二分查找算法C++实现

    /************************************************************************* > File Name: binary_se ...

  8. @Transactional事务总结

    一:加了注解@Transactional就能起作用的原理总结: 1:首先是由类:JdkDynamicAopProxy,在invoke方法里面创建动态代理类,同时由拦截类进行拦截,代码如下所示: Lis ...

  9. Git+TortoiseGit使用帮助

    背景: 公司产品人员需要使用到Git做文档的管理,作为开发人员的我稍作指导 需求: 指导产品人员进行简单使用ToreoiseGit进行Git操作 安装: 链接:https://pan.baidu.co ...

  10. 对Redis 单进程、单线程模型的理解(网摘)

    1.基本原理 采用多路 I/O 复用技术可以让单个线程高效的处理多个连接请求(尽量减少网络IO的时间消耗) (1)为什么不采用多进程或多线程处理? 多线程处理可能涉及到锁 多线程处理会涉及到线程切换而 ...