您好,登錄后才能下訂單哦!
當使用mysql -uroot -p -h272.16.1.51 登錄數據庫的時候,用的是TCP協議,用status命令查看:
mysql> status;
--------------
mysql Ver 14.14 Distrib 5.6.38, for Linux (x86_64) using EditLine wrapper
Connection id: 10
Current database:
Current user: root@mysql03
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.6.38-log Source distribution
Protocol version: 10
Connection: 172.16.1.53 via TCP/IP
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
TCP port: 3306
Uptime: 18 min 40 sec
而不加 h 的時候,是這樣的:
mysql> status;
--------------
mysql Ver 14.14 Distrib 5.6.38, for Linux (x86_64) using EditLine wrapper
Connection id: 11
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.6.38-log Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /application/mysql-5.6.38/tmp/mysql.sock
Uptime: 21 min 36 sec
是使用的UNIX socket,即UNIX套接字。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。