Blog Pages

MySQL - Can not connect to the database

Error message:

ERROR 2003 (HY000): Can't connect to MySQL server on '....' (111).


Solution:

  1. Check connection details:
    1. Verify that the IP is correct.
    2. Verify that the Port number is correct.
    3. Check username and password.
  2. Network issues:
    1. Check that connection to VPN or any other connection types.
    2. Check Firewall definition.
    3. For cloud instances: check that your IP is allowed.
  3. Check that MySQL is up:
    1. Check that the MySQL service is up:
      1. Windows: in the services.
      2. Linux: sudo systemctl start <SERVICENAME>
  4. MySQL configurations:
    1. Max connections - see here: http://copypastenet.blogspot.com/2021/02/mysql-see-orand-change-how-many.html 
    2. cnf file configurations.

No comments:

Post a Comment