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. springboot中Properties注解的实现

    关于@PropertySources注解的理解:http://www.imooc.com/article/252889?block_id=tuijian_wz public interface Pro ...

  2. hive 元数据库表描述

    元数据库表描述 这一节描述hive元数据库中比较重要的一些表的作用,随着后续对hive的使用逐渐补充更多的内容. mysql元数据库hive中的表: 表名 作用 BUCKETING_COLS 存储bu ...

  3. html 中a标签的问题(无反应,跳转,调用方法)

    让超链接点击后不跳转,可以用href = "#",但是这个#就会锚点到页面最上边     点击链接后不跳转可以设置成     1.<a href="javascri ...

  4. web开发中xml的内容

    文档声明(注:文档声明前不能有注释) XML中的元素/标签 注:xmlx中解析程序会将其中的空格与换行当做内容来解析,区分大小写 CDATA区域中的内容不解析

  5. Java编程基础篇第六章

    构造方法 一:概念: 给对象的数据(属性)进行初始化 二:特点: a.方法名与类同名(字母大小写也要一样) b.没有返回值类型 c.没有具体的返回值 return 三:构造方法重载: 方法名相同,与返 ...

  6. Luogu 1042 - 乒乓球 - [简单模拟]

    题目链接:https://www.luogu.org/problemnew/show/P1042 题目背景国际乒联现在主席沙拉拉自从上任以来就立志于推行一系列改革,以推动乒乓球运动在全球的普及.其中 ...

  7. scrollview嵌套tableview

    之前写过一次,忘记了, 用的通知 FS

  8. c语言实现wc功能

    本随笔对网站http://blog.chinaunix.net/uid-22566367-id-381958.html有所借鉴 #include <stdio.h> #define BEG ...

  9. WebService简单搭建和调用

    http://www.cnblogs.com/JiYF/p/6164859.html https://www.cnblogs.com/JiYF/p/6169349.html #region Invok ...

  10. iPhoneX快速适配,简单到你想哭。

    研究了5个小时的iPhoneX适配. 从catalog,storyboard,safearea等一系列文章中发现.如果我们想完全撑满全屏.那直接建一个storyboard就好了.但撑满全屏后,流海就是 ...