Background of the problem:
My local machine do:
Intranet Server machine Multiple units: server_a Server_b
Personal Extranet machine: Net
Now the local server_a server_b net has MySQL and PHP
The problem is this.
PHP code is the simplest mysql_connect connection database, the same code
# -> :标示请求数据, =》:标示结果local php -> local mysql =>oklocal php -> server_a mysql =>errorlocal php -> net mysql =>okserver_a php -> server_a mysql =>okserver_b php -> server_a mysql =>ok
Why the local PHP connection server_a will be problematic.
数据库配置和php代码完全一样
Ask the big God for possible reasons
Reply content:
Background of the problem:
My local machine do:
Intranet Server machine Multiple units: server_a Server_b
Personal Extranet machine: Net
Now the local server_a server_b net has MySQL and PHP
The problem is this.
PHP code is the simplest mysql_connect connection database, the same code
# -> :标示请求数据, =》:标示结果local php -> local mysql =>oklocal php -> server_a mysql =>errorlocal php -> net mysql =>okserver_a php -> server_a mysql =>okserver_b php -> server_a mysql =>ok
Why the local PHP connection server_a will be problematic.
数据库配置和php代码完全一样
Ask the big God for possible reasons
Your local service is not in a network with the server, if it is not on the Internet, then we can not talk about access.
If you're on a network, or if you have an external port, check to see if MySQL in the server has permission to open external access.
Http://www.cnblogs.com/qq78292959/archive/2012/05/17/2505832.html
That's wrong.
Is it the same as a network segment? MySQL user is not%?