php因为目标机器积极拒绝,无法连接(注意:phpmyadmin完全正常,只有自己写的代码出错)

WBOY
Release: 2016-06-13 12:49:34
Original
927 people have browsed it

php由于目标机器积极拒绝,无法连接(注意:phpmyadmin完全正常,只有自己写的代码出错)
php配置完全正常,phpmyadmin工作完全正常,sqlyog/mysql自带命令行工具完全正常

注意:phpmyadmin完全正常,也就是说php-mysql完全正常,mysql/apache服务完全正常


所有自己写的$conn = mysql_connect ( "127.0.0.1", "test", "test" ) or die ("fail:".mysql_error());
全都报错:---fail:由于目标机器积极拒绝,无法连接。


这是什么原因????不要说环境的问题,phpmyadmin工作正常已经说明了一切问题.

php mysql phpmyadmin
------解决方案--------------------
尝试 127.0.0.1 改为 localhost
并确认 test 用户有连接权
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!