Troubleshooting ERROR 2003: Can't Connect to MySQL Server
This error occurs when attempting to connect to the MySQL server on '127.0.0.1', but the connection fails with the error "Can't connect to MySQL server on '127.0.0.1' (111)."
Solution for Ubuntu Users (without MySQL Replication)
If you're running Ubuntu, modify the bind-address parameter in the MySQL configuration file:
Solution for MySQL Replication Enabled
If MySQL replication is enabled, try connecting to the MySQL server using the specific IP address listed in the parameter bind-address in the my.cnf file. This IP address specifies the IP address on which the MySQL server is bound to listen for connections. Replace localhost or 127.0.0.1 with this IP address when attempting to connect.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3