Note
This variable was introduced in OceanBase Database V2.2.77.
Description
secure_file_priv specifies the path in which file import and export can be performed. This variable can be specified only by the database administrator (DBA).
Notice
For security reasons, an SQL statement that modifies this global variable can only be executed by a client connected by using a local Unix socket.
Attributes
| Attribute | Description |
|---|---|
| Type | Varchar |
| Default value | “NULL” |
| Value range |
|
| Effective scope | Global |
| Modifiable | Yes. You can use the SET statement to modify the variable. |
| Plan generation affected | Yes |
| Nullable | Yes |
Considerations
You can connect to OceanBase Database only by using a local Unix socket. Here is an example:
obclient -S /home/admin/oceanbase/run/sql.sock -u******@obtenant -p******
The parameters are described as follows:
-Sspecifies the path to the Unix socket file for the local OBServer node. The file is namedsql.sockand is in therun/directory in the local OBServer node installation directory. The default value is/home/admin/oceanbase/run/sql.sock.-uspecifies the tenant account name in the Username@Tenant name format.- You can connect to only a local OBServer node by using a Unix socket connection. Make sure that the resources of the tenant are distributed across local OBServer nodes. Otherwise, you cannot connect to the tenant by using the local OBServer node.
Example
obclient> SET GLOBAL secure_file_priv = "";