Trying to connect to remote MySQL host (error 2003)

前端 未结 5 1071
南旧
南旧 2020-12-01 15:44

I have a MySQL instance running on a Debian server and I can connect to it locally with no problems. However, I am unable to connect to it remotely. When I try this from m

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-01 16:34

    This may due to 3306 port is closed , check your server port status

    http://www.yougetsignal.com/tools/open-ports/

    If it shows closed, that means you can't access it from out side the machine , to open the port

    ufw - Uncomplicated Firewall

    The default firewall configuration tool for Ubuntu is ufw. The following are some examples of how to use ufw:

    First, ufw needs to be enabled. From a terminal prompt enter:

    sudo ufw enable
    

    To open a port (mysql):

    sudo ufw allow 3306
    

    To see the firewall status, enter:

    sudo ufw status
    

提交回复
热议问题