zoukankan      html  css  js  c++  java
  • mysql dumpfile 与 outfile 函数的区别

    在windows下验一下这两个函数的区别

    ubuntu下不成功,权限出错

    mysql> select * from demo;
    +-------------+--------------+
    | first_field | second_field |
    +-------------+--------------+
    | ab          |            2 |
    | abc         |            3 |
    +-------------+--------------+
    2 rows in set (0.00 sec)
    
    mysql> select * from demo into outfile '/home/vigar/tst/aaa';
    ERROR 1 (HY000): Can't create/write to file '/home/vigar/tst/aaa' (Errcode: 13)
    mysql> create table a (cmd LONGBLOB);
    Query OK, 0 rows affected (0.14 sec)
    
    mysql> select * from a;
    Empty set (0.00 sec)
    
    mysql> insert into a (cmd) values (hex(load_file('/usr/bin/zip')));
    Query OK, 1 row affected (0.00 sec)
    
    mysql> select * from a;
    +------+
    | cmd  |
    +------+
    | NULL |
    +------+
    1 row in set (0.00 sec)
    
    mysql> select unhex(cmd) from a into dumpfile './aaa';
    Query OK, 1 row affected (0.00 sec)
    但没有找到aaa的具体位置
  • 相关阅读:
    Ubuntu中Nginx的安装与配置
    在Ubuntu中安装Redis
    微博开放平台
    QQ互联 回调地址
    PostgreSQL在Ubuntu上安装指南
    postgresql常用命令
    在Linux下查看环境变量
    vue-04-组件
    vue-03-style与class
    vue-02-安装-指令
  • 原文地址:https://www.cnblogs.com/vigarbuaa/p/2703197.html
Copyright © 2011-2022 走看看