在我們用客戶端及其遠(yuǎn)程連接服務(wù)器Mysql數(shù)據(jù)庫(kù)的過(guò)程中,容易出現(xiàn)下面問(wèn)題: 問(wèn)題代碼代碼 ERROR 2003 (HY000): Cant connect to MySQL server on 192.168.0.19 (111)
ERROR 2003 (HY000): Cant connect to MySQL server on 192.168.0.19 (111)
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 我們需要做的就是屏蔽這個(gè)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 現(xiàn)在你就可以用mysql -h命令進(jìn)行你想做的操作了,如登錄系統(tǒng): 登陸數(shù)據(jù)庫(kù)代碼 mysql -h 192.168.0.19 -u root -p