Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MySQL error ERROR 1290 (HY000): running with the-- secure-file-priv

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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

Mysql > select * from test into outfile'/ var/lib/mysql-files/test_out.txt' fields terminated by', 'optionally enclo

Sed by'"

Query OK, 5 rows affected (0.21 sec)

Secure_file_priv parameter description:

This parameter is used to limit the effect of data import and export operations, such as LOAD DATA, SELECT... The INTO OUTFILE statement and the LOAD_FILE () function. These actions require the user to have FILE privileges.

1. If this parameter is empty, the variable has no effect

two。 If this parameter is set to a directory name, the MySQL service only allows the import and export of files in that directory. This directory must exist, MyS

The QL service will not create it

3. If this parameter is NULL,MySQL service, import and export operations are disabled. This parameter was introduced in MySQL version 5.7.6

Secure_file_priv may be set as follows:

If empty, the variable has no effect. This is not a secure setting.

If set to the name of a directory, the server limits import and export operations to work only with files in that dire

Ctory. The directory must exist; the server will not create it.

If set to NULL, the server disables import and export operations.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report