Mysql - connect to remote server using IP address

后端 未结 4 419
时光说笑
时光说笑 2020-12-09 11:35

I am using PHP and MySQL to make a database connection, the only change is that I am trying to access my remote server from my local computer using my server IP address.

4条回答
  •  不知归路
    2020-12-09 12:13

    Most default installs of MySQL only listen to the local machine.

    Look for the bind-address setting in my.cnf on the server, and make sure it's listening on the IP address you're targetting. You may also need to ensure skip-networking isn't switched on!

    Alternatively (and less securely!) the following will set it up to listen on all addresses - local and remote:

    bind-address = 0.0.0.0
    

提交回复
热议问题