您的位置:首页 > 数据库 > SQL

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

2018-03-20 11:23 771 查看
执行从txt中导入数据到mysql表中:

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

解决:

方法一:

show variables like ‘%secure%’;查看 secure-file-priv 当前的值是什么

show variables like '%secure%'

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.01 sec)


/var/lib/mysql-files/


这个就是咯,把txt文件复制到这个目录下

方法二:修改配置文件:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql
相关文章推荐