如題,今天打開MySQL時,出現了這種問題,無法連接到數據庫
問題原因:The error (2003) Can't connect to MySQL server on '
indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.server
' (10061)
也就是說MySQL的服務被拒絕
解決方法:
打開控制台 -> 輸入"services.msc" -> 找到MySQL服務 -> 右鍵並啟動之
或者右鍵"計算機" -> "管理" -> "服務與應用程序"中的"服務" -> 找到MySQL服務 -> 右鍵並啟動之