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. linux Ubuntu系统安装百度aip

    1.下载百度api pip install baidu-aip 2.配置视频转码工具ffmpeg Ubuntu16.04下安装FFmpeg(超简单版) 第一步:添加源. sudo add-apt-re ...

  2. F - Currency Exchange

    来源poj1860 everal currency exchange points are working in our city. Let us suppose that each point sp ...

  3. Python学习之旅(二十四)

    Python基础知识(23):进程和线程(Ⅱ) 一.threadlocal 在多线程环境下,每个线程都有自己的数据 一个线程使用自己的局部变量比使用全局变量好,因为局部变量只有线程自己能看见,不会影响 ...

  4. python全栈开发 * 15知识点汇总 * 180621

    #15 函数二 与 匿名函数1.dir() # 查看内置属性,将对象所有方法名放在另一个列表中.dic={"水果":"香蕉",'蔬菜':"土豆&quo ...

  5. 找不到 main 方法, 请将 main 方法定义为: public static void main(String[] args) 否则 JavaFX 应用程序类必须扩展javafx.应用程序类必 须扩展javafx.application.Application”

    用eclipse写代码的时候,写了一个简单的程序,编译的时候突然出现“错误: 在类 com.test.demo 中找不到 main 方法, 请将 main 方法定义为: public static v ...

  6. Prometheus监控学习记录

    官方文档 Prometheus基础文档 从零开始:Prometheus 进阶之路:Prometheus —— 技巧篇 进阶之路:Prometheus —— 理解篇 prometheus的数据类型介绍 ...

  7. elastricsearch学习笔记

    一.基础概念 Elasticsearch有几个核心概念.从一开始理解这些概念会对整个学习过程有莫大的帮助. 接近实时(NRT)         Elasticsearch是一个接近实时的搜索平台.这意 ...

  8. .net 问题

    1.socket初始化三个步骤 2.多线程 3.mvc的理解

  9. winfrom弹出窗口用timer控件控制倒计时20秒后关闭

    功能描述: 因为在程序退出时需要确认是否是误操作,所以加了密码输入的子窗体,子窗体在20秒内会自动关闭 代码如下: private int count; private void Form2_Load ...

  10. Jmeter学习之-获取登录的oken值(2)

    此篇介绍获取登录token的第二种方式--json提取器提取 PS:此方法针对接口返回值为json串格式 在登录请求上右键添加JSON提取器                               ...