socket

2025-11-14 07:33:33  Updated

Note

  • For V4.3.x, this variable was introduced starting from V4.3.5 BP1.
  • For other versions of V4.2.x, this variable was introduced starting from V4.2.5 BP1. For V4.2.1, it was introduced starting from V4.2.1 BP10.

Description

The socket variable specifies the name of the Socket file connected to the local client.

Applicability

This variable applies only to the MySQL-compatible mode of OceanBase Database.

Privilege requirement

  • Query variables

    The sys tenant and all user tenants can use the SHOW VARIABLES statement or the information_schema.GLOBAL_VARIABLES view (MySQL-compatible mode) to view the values of global system variables.

  • Modify variables

    You cannot modify this variable.

Attributes

Attribute Description
Parameter type Varchar
Default value /run/sql.sock
Scope GLOBAL
Modifiable No

Examples

Query the name of the socket file connected to the local client.

obclient> SHOW VARIABLES LIKE 'socket';

The query result is as follows:

+---------------+------------------------------------+
| Variable_name | Value                              |
+---------------+------------------------------------+
| socket        | /home/admin/oceanbase/run/sql.sock |
+---------------+------------------------------------+
1 row in set (0.003 sec)

References

secure_file_priv

Contact Us