1. 程式人生 > >解決MySQL workbench的Can't connect to MySQL server on '127.0.0.1'(10061)問題

解決MySQL workbench的Can't connect to MySQL server on '127.0.0.1'(10061)問題

如題,今天開啟MySQL時,出現了這種問題,無法連線到資料庫

問題原因:The error (2003) Can't connect to MySQL server on 'server' (10061) 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.

也就是說MySQL的服務被拒絕

 

解決方法:

開啟控制檯 -> 輸入"services.msc" -> 找到MySQL服務 -> 右鍵並啟動之

或者右鍵"計算機" -> "管理" -> "服務與應用程式"中的"服務" -> 找到MySQL服務 -> 右鍵並啟動之