centos7.5 使用into outfile备份失败

问题:

mysql>  select * from world.city into outfile '/tmp/world_city.data';
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

原因:

mysql> show variables like '%secure%';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| secure_auth | ON |
| secure_file_priv | NULL |
+------------------+-------+
没有指定secure_file_priv位置

解决方法:

[root@db01-51 ~]# vim /etc/my.cnf
[mysqld]
secure_file_priv=/tmp #指定secure_file_priv的位置
[root@db01-51 ~]# /etc/init.d/mysqld restart
mysql> select * from world.city into outfile '/tmp/world_city.data';
Query OK, 4079 rows affected (0.02 sec)

注意: select ......into outfile 是一种逻辑备份方法,它的恢复速度非常之快,比insert的插入速度还要快。它只能备份表中的数据,并不能包含表的结构。 一般不用它来做备份

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement的更多相关文章

  1. ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statemen

    转自:http://www.cnblogs.com/iosdev/archive/2013/07/15/3190431.html mysql 配置文件目录:/etc/my.cnf root 密码为空的 ...

  2. ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables opt

    mysql跳过权限: mysqld -nt --skip-grant-tables opt 登录:mysql -uroot -p 修改root密码 set password for 'root'@'l ...

  3. ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe

    在Mysql集群中创建用户时.出现如下错误! mysql> create user 'testuse'@'localhost' identified by '111111'; ERROR 129 ...

  4. ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv opti on so it cannot exe

    Mysql导入csv文件时报错:ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv opti on ...

  5. 【MySQL报错】ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

    ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec ...

  6. mysql error 1290 hy000:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statemen' 解决方案

    如果在执行授权命令的时候报错 mysql> grant all privileges on *.* to root@"; ERROR (HY000): The MySQL server ...

  7. The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

    skip-grant-tables下 GRANT ALL PRIVILEGES ON *.* TO helei IDENTIFIED BY 'MANAGER' WITH GRANT OPTION; 执 ...

  8. mysql错误:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement解决方法

    本文为大家讲解的是mysql错误:The MySQL server is running with the --skip-grant-tables option so it cannot execut ...

  9. mysqldump 使用--tab=path参数时提示mysqldump: Got error: 1290: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement when executing 'SELECT INTO OUTFILE'

    报错: [root@zedu test]# mysqldump -h127.0.0.1 -uroot -p --single-transaction --add-drop-database --tab ...

随机推荐

  1. js---设置cookie的方法

    在客户端进行一些操作的时候,很多时候会要用到设置cookie的方法.具体的做法: <script type="text/javascript"> var documen ...

  2. UnicodeEncodeError: 'latin-1' codec can't encode characters in position 41-50: ordinal not in range(256)

    在处理标题或网址为中文的文件或网页的时候,报UnicodeEncodeError: 'latin-1' codec can't encode characters in position 41-50: ...

  3. threding模块的其他用法

    import threading import time def func(n): time.sleep(0.5) n += 1 print(n, threading.current_thread() ...

  4. 传纸条---(dp)

    题目描述 小渊和小轩是好朋友也是同班同学,他们在一起总有谈不完的话题.一次素质拓展活动中,班上同学安排做成一个mmm行nnn列的矩阵,而小渊和小轩被安排在矩阵对角线的两端,因此,他们就无法直接交谈了. ...

  5. Nginx打卡

    Nginx打卡 此括号中的是干货 [ 直接说最关心的事:如何去掉访问路径的端口号? 答案:使用Nginx啊 具体安装还需看底下啰嗦的东东,安装OK且完美启动的同学,server proxy_pass ...

  6. sublime插件之px转rem

    sublime插件之px转rem   安装: 1.下载sublime并安装: 2.下载cssrem:https://github.com/hyb628/cssrem: 3.找到 Packages (首 ...

  7. day21 二十一、垃圾回收机制、re正则

    一.内存管理 1.垃圾回收机制:不能被程序访问到的数据称之为垃圾 2.引用计数:引用计数是用来记录值的内存地址被记录的次数 每一次对值地址的引用都可以使该值的引用计数 +1 每一次对值地址的释放都可以 ...

  8. 安装Linux系统

    一.环境准备 1.一个VM虚拟机镜像,一个CentOS-7镜像(注:CentOS-7和CentOS-6在命令上有很大的差别,这里选择CentOS-7版本) 二.开始安装 1.新建一个虚拟机,选择自定义 ...

  9. linux安装lamp/lamp/lanmp

    wdcp安装lamp/lanp/lanmp 和宝塔(centOS)1. yum install -y wget  //yum安装wegt2. wget http://dl.wdlinux.cn/fil ...

  10. js 获取时区

    js的时区函数: 设datename为创建的一个Date对象 ====================datename.getTimezoneOffset()--取得当地时间和GMT时间(格林威治时间 ...