mysql_connect(): No connection could be made because the target machine actively refused it

后端 未结 10 1901
长情又很酷
长情又很酷 2020-11-30 12:41

I have this problem when I am trying to run my PHP MySQL script. When I try to run my .php file this is what I get.

mysql_connect(): No connection could be m         


        
10条回答
  •  南笙
    南笙 (楼主)
    2020-11-30 12:59

    This error is NOT password related.

    Password related errors display a response from MySQL server. The subject response is NOT coming from MySQL server, but from the client itself. It could not connect to the server because the MACHINE (not the server) refused it, so, it was more likely to be a network issue or some other thing.

    Try connecting to 127.0.0.1. Also check the port you are connecting to and which port is mysql running. Check for firewalls blocking connections. Are you sure is MySQL Server running?

    This answer may have additional info: PHP -MySQL:No connection could be made

提交回复
热议问题