时间:2021-07-01 10:21:17 帮助过:3人阅读
mysql> load data infile ‘/mnt/test/20190220/test_eventHistory_2019022000_2019022023.txt‘ into table event_history_201902(json_str);
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%‘;
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| require_secure_transport | OFF |
| secure_auth | ON |
| secure_file_priv | NULL |
+--------------------------+-------+
3 rows in set (0.01 sec)
mysql> set global secure_file_priv=‘‘;
ERROR 1238 (HY000): Variable ‘secure_file_priv‘ is a read only variable
[mysqld]
...
secure_file_priv=‘‘
...
# /etc/init.d/mysqld restart
#
mysql> show global variables like ‘%secure%‘;
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| require_secure_transport | OFF |
| secure_auth | ON |
| secure_file_priv | |
+--------------------------+-------+
3 rows in set (0.00 sec)
mysql> load data infile ‘/mnt/test/20190220/test_eventHistory_2019022000_2019022023.txt‘ into table event_history_201902(json_str);
Query OK, 234 rows affected (0.00 sec)
mysql5.7导入数据提示--secure-file-priv选项报错解决
标签:并且 ted 0.00 mysql 选项 语句 null set 导出