MySQL Variables socket 数据库 参数变量解释及正确配置使用
本站中文解释
字段
MySQL的socket字段用于指定当服务器接收或发送数据时,用于建立连接的插座服务器路径。它最常用于将服务器和本地主机连接起来。可以在MySQL服务器配置文件my.cnf中设置socket字段。
设置方法:在my.cnf中添加socket字段。例如:
socket =/tmp/mysql.sock
注意:在设置时应遵循系统指定的路径格式。
官方英文解释
socket
Command-Line Format | --socket={file_name|pipe_name} |
---|---|
System Variable | socket |
Scope | Global |
Dynamic | No |
Type | String |
Default Value (Windows) | MySQL |
Default Value (Other) | /tmp/mysql.sock |
On Unix platforms, this variable is the name of the socket
file that is used for local client connections. The default is
/tmp/mysql.sock
. (For some distribution
formats, the directory might be different, such as
/var/lib/mysql
for RPMs.)
On Windows, this variable is the name of the named pipe that
is used for local client connections. The default value is
MySQL
(not case-sensitive).