站点图标 moneyslow.com

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

mysql数据库技巧

mysql数据库技巧

mysql> select …
into outfile '/tmp/hh.json';
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

查看安全设置的目录位置:

mysql> show global variables like '%secure_file_priv%';
+------------------+-----------------------+
| Variable_name | Value |
+------------------+-----------------------+
| secure_file_priv | /var/lib/mysql-files/ |
+------------------+-----------------------+
1 row in set (0.02 sec)

改为参数设定的安全目录

mysql> select …
into outfile '/var/lib/mysql-files/hh.json';

退出移动版