zoukankan      html  css  js  c++  java
  • The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

    导出表格到xls文件,报错:

    mysql> select count(*) into outfile '/tmp/people.xls' from fp_people;

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

    查看--secure-file-priv的值,--secure-file-priv值的默认目录是 /var/lib/mysql-files/

    mysql> show variables like '%secure%';

    +--------------------------+-----------------------+

    | Variable_name            | Value                 |

    +--------------------------+-----------------------+

    | require_secure_transport | OFF                   |

    | secure_auth              | ON                    |

    | secure_file_priv         | /var/lib/mysql-files/ |

    +--------------------------+-----------------------+

    3 rows in set (0.00 sec)

    把输出的地址改成/var/lib/mysql-files/,语句执行成功:

    mysql> select count(*) into outfile '/var/lib/mysql-files/people.xls' from fp_people;

    Query OK, 1 row affected (0.01 sec)

    结束。

     

  • 相关阅读:
    HTML5新特性,新的 Input 类型
    HTML5新特性,拖放(Drag 和 Drop)
    剑指 Offer 32
    剑指 Offer 28. 对称的二叉树
    993. 二叉树的堂兄弟节点
    897. 递增顺序查找树
    872. 叶子相似的树
    637. 二叉树的层平均值
    617. 合并二叉树
    559. N叉树的最大深度
  • 原文地址:https://www.cnblogs.com/liusingbon/p/13043578.html
Copyright © 2011-2022 走看看