码迷,mamicode.com
首页 > 其他好文 > 详细

UNIX域套接字

时间:2015-12-05 17:28:54      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:

用户可以在配置文件中指定套接字文件的路径,如--socket=/data/mysql/mysql.sock

[root@localhost ~]# mysql -uroot -p123456 -S /data/mysql/mysql.sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.41-log Source distribution

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the buffer.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| handan |
| monkey |
| mysql |
| test |
+--------------------+
5 rows in set (0.15 sec)

mysql> show variables like ‘socket‘;
+---------------+------------------------+
| Variable_name | Value |
+---------------+------------------------+
| socket | /data/mysql/mysql.sock |
+---------------+------------------------+
1 row in set (0.07 sec)

 

UNIX域套接字

标签:

原文地址:http://www.cnblogs.com/sixiong/p/5021799.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!