执行从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文件复制到这个目录下
方法二:修改配置文件: