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";
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解决办法的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- [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" ”:很多人添加权限依然不 ...
- 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 ...
- 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. ...
- Mysql Update更新错误 Error Code:1175
Mysql 5.7,默认执行 update 语句时遇到错误提示: Error Code: 1175. You are using safe update mode and you tried to u ...
- 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 ...
随机推荐
- keepalived+LVS-DR集群
一.Keepalived介绍 keepalived 是一个类似于 layer3, 4 & 5 交换机制的软件,也就是我们平时说的第 3 层.第 4 层和第 5层交换. Keepalived 的 ...
- c语言求素数以及改进算法
代码需要使用c99编译 #include <stdio.h> #include <stdlib.h> #include <math.h> //是否为素数 //从2到 ...
- [Http] Difference between POST and GET?
What is the difference between POST and GET HTTP requests? GET and POST are two different types of H ...
- SLC cache功能
由于TLC需要多次编程,且未全部编程时wordLine处于不稳定状态,所以一般都会划出一部分区域作为SLC cache使用 SLC cache主要功能是,SSD接收到写命令后,先将数据写入SLC ca ...
- pandas中对日期型数据进行处理
因为数据不方便展示,直接上代码. 将字符串转为datetime64[ns]格式: pd.to_datetime('2019-12-20') or pd.to_datetime('20191220') ...
- C学习笔记-字符串处理函数
字符串函数是最问常用的库函数之一,本文整理了常用的字符串函数,其来源为互联网 函数名: stpcpy 功 能: 拷贝一个字符串到另一个 用 法: char *stpcpy(char *destin, ...
- mysql 插入数据后返回自增 ID 的七种方法
参考地址:https://blog.csdn.net/qq_30715329/article/details/80868411 其中使用函数方式.存储过程方式.注解方式.xml属性方式设置都可. 常用 ...
- 暑假--升级攻击家庭wifi
参考: 1.http://blog.jobbole.com/64832/ 2.http://blog.jobbole.com/65851/ 3.http://blog.jobbole.com/6562 ...
- jps 命令
NAME jps - Lists the instrumented Java Virtual Machines (JVMs) on the target system. This command is ...
- HDU1814(Peaceful Commission) 【2-SAT DFS暴力求最小字典序的模板】
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1814 题意:给出一个数n,代表有n个党派,每个党派要求派出其中一个人去参加会议,且只能派出一人.给出m ...