Can't connect to MySQL server on (ip or domain name)

前端 未结 6 2224
旧巷少年郎
旧巷少年郎 2021-02-13 16:48

I\'m trying to configure a web server (Debian 7). I followed this tutorial. I\'m renting my server thanks to gandi.net service. And i have now apache2, mysql, php5 up and runnin

6条回答
  •  耶瑟儿~
    2021-02-13 17:33

    This is the solution that worked for me: In Debian 7 look in the my.cnf under /etc/mysql/my.cnf and find the following lines:

    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address        = 127.0.0.1
    

    Now change the 127.0.0.1 to the IP address of the mysql server, you want to connect or 0.0.0.0 for no restriction.

提交回复
热议问题