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

    mysql 导入出错

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

    查看参数

    root@mysqldb 15:00:  [school]>show variables like '%priv%';
    +-------------------------+-----------------------+
    | Variable_name           | Value                 |
    +-------------------------+-----------------------+
    | automatic_sp_privileges | ON                    |
    | secure_file_priv        | /var/lib/mysql-files/ |
    +-------------------------+-----------------------+
    2 rows in set (0.00 sec)

    修改变量在my.cnf 添加 secure_file_priv

    $ cat /etc/my.cnf |grep -i priv
    secure_file_priv=/data

    重启mysql

    $ service mysqld restart
    Redirecting to /bin/systemctl restart mysqld.service

    两次导入

    root@mysqldb 15:03:  [school]>load data infile '/data/olympics.csv' into table olympics fields terminated by ',' lines terminated by '
    ';
    Query OK, 29217 rows affected, 29048 warnings (0.18 sec)
    Records: 29217  Deleted: 0  Skipped: 0  Warnings: 29048
  • 相关阅读:
    初识echarts
    深浅拷贝的理解
    react基本语法及组件
    webpack使用
    网上面试资料整理
    封装原生promise函数
    vue路由懒加载及组件懒加载
    译文---C#堆VS栈(Part Four)
    译文---C#堆VS栈(Part Three)
    译文---C#堆VS栈(Part Two)
  • 原文地址:https://www.cnblogs.com/tingxin/p/13914581.html
Copyright © 2011-2022 走看看