ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061)
时间: 2023-10-27 22:52:27 浏览: 42
This error message indicates that the MySQL server is not running or is not reachable on the specified host and port. Possible reasons for this error include:
1. MySQL server is not running: Check if the MySQL server is running on your local machine. You can start the server using the following command: `sudo service mysql start`
2. Firewall issue: Check if your firewall is blocking the MySQL port. You can allow the MySQL port using the following command: `sudo ufw allow mysql`
3. Incorrect login credentials: Check if you are using the correct login credentials to access the MySQL server.
4. Incorrect host or port: Check if you are using the correct host and port to connect to the MySQL server. By default, MySQL listens on port 3306.
5. Network connectivity issue: Check if there is any network issue preventing the communication between the client and the server. You can try pinging the server to see if it responds.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)