secure-file-priv option so it cannot execute this statement
Posted omsql
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了secure-file-priv option so it cannot execute this statement相关的知识,希望对你有一定的参考价值。
mysql> select emp_no,first_name,last_name,gender into outfile ‘/home/mycat/t1.txt‘
-> FIELDS TERMINATED BY ‘,‘ OPTIONALLY ENCLOSED BY ‘"‘ LINES TERMINATED BY ‘\n‘ from employees.t_emp ;
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
mysql> show variables like ‘%secure%‘;
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| require_secure_transport | OFF |
| secure_auth | ON |
| secure_file_priv | NULL |
+--------------------------+-------+
3 rows in set (0.00 sec)
修改my.cnf 重启mysql
mysql> show variables like ‘%secure%‘;
+--------------------------+--------------+
| Variable_name | Value |
+--------------------------+--------------+
| require_secure_transport | OFF |
| secure_auth | ON |
| secure_file_priv | /home/mysql/ |
+--------------------------+--------------+
3 rows in set (0.00 sec)
以上是关于secure-file-priv option so it cannot execute this statement的主要内容,如果未能解决你的问题,请参考以下文章
MySQL之表导入导出失败——The MySQL server is running with the --secure-file-priv option
mysql导入导出数据报错The MySQL server is running with the --secure-file-priv option解决办法
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
MYSQL导入数据出现ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it
当用命令导入csv文件时提示错误[Err] 1290 - The MySQL server is running with the --secure-file-priv option so it ca