国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

詳解遠程連接Mysql數據庫的問題(ERROR 2003 (HY000))

2024-07-24 12:48:22
字體:
來源:轉載
供稿:網友

在我們用客戶端及其遠程連接服務器Mysql數據庫的過程中,容易出現下面問題:
問題代碼代碼
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.19' (111) 
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.19' (111)      這個 原因就是Mysql數據庫的默認配置文件my.cnf(linux下)中的bind-address默認為127.0.0.1,所以就算你創建了可以 remote訪問的用戶,你也不能使用mysql -h命令進行訪問,若訪問就會出現上出問題,因為此時Mysql只接受localhost,所以需要把bind-address屏蔽掉。

my.cnf一般在/etc/mysql下面,如果不在使用locate my.cnf查找,修改前的my.cnf配置文件為:

修改前的my.cnf配置文件代碼

# Instead of skip-networking the default is now to listen only on 
# localhost which is more compatible and is not less secure. 
bind-address           = 127.0.0.1 
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address           = 127.0.0.1
我們需要做的就是屏蔽這個bind-address代碼,屏蔽后代碼為:

屏蔽后my.cnf配置文件代碼

# Instead of skip-networking the default is now to listen only on 
# localhost which is more compatible and is not less secure. 
#bind-address           = 127.0.0.1 
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address           = 127.0.0.1
現在你就可以用mysql -h命令進行你想做的操作了,如登錄系統:

登陸數據庫代碼
mysql -h 192.168.0.19 -u root -p

您可能感興趣的文章:

MySQL數據庫遠程連接開啟方法遠程連接mysql 授權方法詳解MySQL遠程連接丟失問題解決方法(Lost connection to MySQL server)mysql 遠程連接數據庫的方法集合配置mysql允許遠程連接的方法解決遠程連接mysql很慢的方法(mysql_connect 打開連接慢)navicat無法遠程連接mysql的解決方法MYSQL不能從遠程連接的一個解決方法(s not allowed to connect to this MySQL server)PHP遠程連接MYSQL數據庫非常慢的解決方法MySQL遠程連接不上的解決方法
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 石渠县| 岫岩| 安义县| 万宁市| 巴中市| 德兴市| 东乌珠穆沁旗| 定日县| 江源县| 沙湾县| 琼海市| 高清| 保德县| 青河县| 沙洋县| 临澧县| 石台县| 绍兴市| 家居| 罗山县| 玛曲县| 宁海县| 丰镇市| 安顺市| 湖州市| 滨海县| 凤凰县| 昌宁县| 大理市| 葵青区| 长阳| 扶绥县| 舒兰市| 海城市| 忻州市| 黎川县| 海安县| 丹江口市| 清涧县| 岑巩县| 库尔勒市|