欧美色在线视频播放 视频,国产精品亚洲精品日韩已方,日本特级婬片中文免费看,亚洲 另类 在线 欧美 制服

<td id="8pdsg"><strong id="8pdsg"></strong></td>
<mark id="8pdsg"><menu id="8pdsg"><acronym id="8pdsg"></acronym></menu></mark>
<noscript id="8pdsg"><progress id="8pdsg"></progress></noscript>

    首頁 >> 百科知識(shí) >

    Localhost(與127.0.0.1和IP的區(qū)別是什么)

    2022-07-02 09:20:06 來源: 用戶: 

    大家好,今天小悅來為大家解答以上問題。Localhost,與127.0.0.1和IP的區(qū)別是什么很多人還不知道,現(xiàn)在讓我們一起來看看吧!

    一般設(shè)置程序時(shí)本地服務(wù)用localhost是最好的,localhost不會(huì)解析成ip,也不會(huì)占用網(wǎng)卡、網(wǎng)絡(luò)資源。

    有時(shí)候用localhost可以,但用127.0.0.1就不可以的情況就是在于此。猜想localhost訪問時(shí),系統(tǒng)帶的本機(jī)當(dāng)前用戶的權(quán)限去訪問,而用ip的時(shí)候,等于本機(jī)是通過網(wǎng)絡(luò)再去訪問本機(jī),用的到網(wǎng)絡(luò)用戶的權(quán)限。
    實(shí)例:
    1. mysql -h 127.0.0.1 的時(shí)候,使用TCP/IP連接,
    mysql server 認(rèn)為該連接來自于127.0.0.1或者是”localhost.localdomain”

    2. mysql -h localhost 的時(shí)候,是不使用TCP/IP連接的,而使用Unix socket;
    此時(shí),mysql server則認(rèn)為該client是來自”localhost”

    3. mysql權(quán)限管理中的”localhost”有特定含義:
    —— MySQL手冊(cè) 5.6.4 ….. A Host value may be a hostname or an IP number, or ‘localhost’ to indicate the local host.

    注意:雖然兩者連接方式有區(qū)別,但當(dāng)localhost 為默認(rèn)的127.0.0.1時(shí),兩種連接方式使用的權(quán)限記錄都是以下的1.row的記錄(因?yàn)橛涗浽谇?,先被匹配?/p>

    *************************** 1. row ***************************
    Host: localhost
    User: root
    ……

    *************************** 2. row ***************************
    Host: 127.0.0.1
    User: root

    證明:

    shell> mysql -h 127.0.0.1
    mysql> status;

    Current user: root@127.0.0.1

    SSL: Not in use
    Current pager: stdout
    Using outfile: ”
    Using delimiter: ;
    Server version: 5.1.33-log Source distribution
    Protocol version: 10
    Connection: 127.0.0.1 via TCP/IP

    shell> mysql -h locahost
    mysql> status;

    Current user: root@localhost
    SSL: Not in use
    Current pager: stdout
    Using outfile: ”
    Using delimiter: ;
    Server version: 5.1.33-log Source distribution
    Protocol version: 10
    Connection: Localhost via UNIX socket

    shell> mysql -h XXXX(ip)

    mysql> status;

    Current user: root@ip

    SSL: Not in use
    Current pager: stdout
    Using outfile: ”
    Using delimiter: ;
    Server version: 5.1.33-log Source distribution
    Protocol version: 10
    Connection: XXXX(ip) via TCP/IP

    本文到此結(jié)束,希望對(duì)大家有所幫助。

      免責(zé)聲明:本文由用戶上傳,與本網(wǎng)站立場無關(guān)。財(cái)經(jīng)信息僅供讀者參考,并不構(gòu)成投資建議。投資者據(jù)此操作,風(fēng)險(xiǎn)自擔(dān)。 如有侵權(quán)請(qǐng)聯(lián)系刪除!

     
    分享:
    最新文章
    站長推薦