久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

Linux下如何查看MySQL端口

132次閱讀
沒有評論

共計 745 個字符,預計需要花費 2 分鐘才能閱讀完成。

本文丸趣 TV 小編為大家詳細介紹“Linux 下如何查看 MySQL 端口”,內容詳細,步驟清晰,細節處理妥當,希望這篇“Linux 下如何查看 MySQL 端口”文章能幫助大家解決疑惑,下面跟著丸趣 TV 小編的思路慢慢深入,一起來學習新知識吧。

MySQL 的端口默認為 3306,但是在安裝過程中有可能修改了 MySQL 端口。

1、登錄 mysql

[root@localhost ~]# mysql -uroot -pEnter password: 輸入數據庫密碼;

2、使用 show global variables like lsquo;port rsquo;; 命令查看端口號,

mysql show global variables like lsquo;port rsquo;;+ mdash; mdash; mdash; mdash; mdash;+ mdash; mdash;-+| Variable_name | Value |+ mdash; mdash; mdash; mdash; mdash;+ mdash; mdash;-+| port          | 3306  |+ mdash; mdash; mdash; mdash; mdash;+ mdash; mdash;-+1 row in set (0.00 sec)

mysql

3306 即為端口號。

二、mysql 端口號的修改

1、編輯 /etc/my.cnf 文件  [root@localhost ~]# vi /etc/my.cnf

2、添加 port=2032;

3、重啟 mysql [root@localhost ~]# /etc/init.d/mysqld restart

讀到這里,這篇“Linux 下如何查看 MySQL 端口”文章已經介紹完畢,想要掌握這篇文章的知識點還需要大家自己動手實踐使用過才能領會,如果想了解更多相關內容的文章,歡迎關注丸趣 TV 行業資訊頻道。

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-07-13發表,共計745字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 名山县| 磐安县| 民乐县| 福鼎市| 嵊州市| 太谷县| 班玛县| 施甸县| 连南| 峡江县| 宾川县| 靖边县| 库车县| 虎林市| 蕉岭县| 万源市| 车致| 吕梁市| 礼泉县| 历史| 安义县| 辽宁省| 莱西市| 沙坪坝区| 手游| 门源| 西宁市| 郁南县| 锡林浩特市| 长海县| 海南省| 云和县| 石河子市| 贵溪市| 无棣县| 重庆市| 宣威市| 丹寨县| 封开县| 广宁县| 大名县|