活动持续链接0 活动链接0 客户端API版本3.23.49 指令本地值Master价值 mysql.allow_persistent On / On mysql.connect_timeout 60/60 mysql.default_host localhost / localhost mysql.default_password没有值/没有价值 mysql.default_port没有值/没有值 mysql.default_socket没有值/没有值 mysql.default_user没有值/没有值 mysql。 max_links无限/无限 mysql.max_persistent无限/无限 mysql.trace_mode关闭/关闭 感谢任何提示: - - | - pozdr。 Dygi [GG 1027078] dygimail(at)poczta(dot)fmHi,PHP 4.3.4 installed manually from package *.zip and Apache 2. I have aproblem with this simple code:<?php$link = mysql_connect("127.0.0.1","","")or die("Could not connect: " . mysql_error());echo "Connected successfully";mysql_close($link);?>And this error occurs:Warning: mysql_connect(): Can''t connect to MySQL server on ''127.0.0.1''(10061) in C:\usr\Apache2\htdocs\friko.pl\index.html on line 18Could not connect: Can''t connect to MySQL server on ''localhost'' (10061)The settings are:Active Persistent Links 0Active Links 0Client API version 3.23.49Directive Local Value Master Valuemysql.allow_persistent On/Onmysql.connect_timeout 60/60mysql.default_host localhost/localhostmysql.default_password no value/no valuemysql.default_port no value/no valuemysql.default_socket no value/no valuemysql.default_user no value/no valuemysql.max_links Unlimited/Unlimitedmysql.max_persistent Unlimited/Unlimitedmysql.trace_mode Off/OffThanks for any hints :--|--pozdr. Dygi [GG 1027078]dygimail(at)poczta(dot)fm推荐答案 link = mysql_connect(" 127.0 .0.1","","") 或die(无法连接:。mysql_error()); echo" ;已成功连接" ;; mysql_close(link = mysql_connect("127.0.0.1","","")or die("Could not connect: " . mysql_error());echo "Connected successfully";mysql_close( link); ?> 发生此错误: 警告:mysql_connect():无法连接到''127.0.0.1'上的MySQL服务器'' ( 10061)在第18行的C:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ localhost''(10061) 设置为: 活动持久链接0 活动链接0 客户端API版本3.23.49 指令本地值主值 mysql.allow_persistent On / On mysql.connect_timeout 60/60 mysql.default_host localhost / localhost mysql.default_password没有值/没有值 mysql.default_port没有值/没有值 mysql.default_socket没有价值/没有价值 mysql.default_user没有价值/没有价值 mysql.max_links无限/无限 mysql.max_persistent无限/无限 mysql.trace_mode关/关 感谢任何提示: - | - pozdr。 Dygi [GG 1027078] dygimail(at)poczta(dot)fmlink);?>And this error occurs:Warning: mysql_connect(): Can''t connect to MySQL server on ''127.0.0.1''(10061) in C:\usr\Apache2\htdocs\friko.pl\index.html on line 18Could not connect: Can''t connect to MySQL server on ''localhost'' (10061)The settings are:Active Persistent Links 0Active Links 0Client API version 3.23.49Directive Local Value Master Valuemysql.allow_persistent On/Onmysql.connect_timeout 60/60mysql.default_host localhost/localhostmysql.default_password no value/no valuemysql.default_port no value/no valuemysql.default_socket no value/no valuemysql.default_user no value/no valuemysql.max_links Unlimited/Unlimitedmysql.max_persistent Unlimited/Unlimitedmysql.trace_mode Off/OffThanks for any hints :--|--pozdr. Dygi [GG 1027078]dygimail(at)poczta(dot)fm 2004-02-04,Dygi先生< dy * *******@SPAMpoczta.fm>写道:On 2004-02-04, Mr Dygi <dy********@SPAMpoczta.fm> wrote: PHP 4.3.4从包* .zip和Apache 2手动安装。我对这个简单的代码有一个问题: <?php Hi, PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a problem with this simple code:<?php 这篇关于连接到MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-11 11:23