generaly it 'mysql.sock' not "'mysql.host'" anyways after u check your script try to see if mysql it's started. netstat -atn u should have a 0.0.0.0:3306 line Luiz Henrique Ozaki wrote: > Im trying to have PHP with mysql but Im not getting it working. > > I need to connect with mysql_connect to a non-local mysql server but im > getting: > Can't connect to MySQL server on 'mysql.host' (13) > > Connecting localhost its normal. > > How can I make php5_mysql connecting to a non-local server ?? > > From phpinfo(): > > > PHP Version 5.0.3 > > > System FreeBSD moon.ibep.net 5.3-RELEASE FreeBSD 5.3-RELEASE #2: Wed > Apr 13 08:31:42 BRT 2005 > root@xxxxxxxxxxxxx:/usr/src/sys/i386/compile/MYKERNEL i386 > Build Date Feb 18 2005 15:52:10 > Configure Command './configure' '--enable-versioning' > '--enable-memory-limit' '--with-layout=GNU' > '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' > '--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-spl' > '--with-regex=php' '--with-apxs2=/usr/local/sbin/apxs' '--disable-ipv6' > '--prefix=/usr/local' 'i386-portbld-freebsd5.3' > Server API Apache 2.0 Handler > Virtual Directory Support disabled > Configuration File (php.ini) Path /usr/local/etc/php.ini > Scan this dir for additional .ini files /usr/local/etc/php > additional .ini files parsed /usr/local/etc/php/extensions.ini > PHP API 20031224 > PHP Extension 20041030 > Zend Extension 220040412 > Debug Build no > Thread Safety disabled > IPv6 Support disabled > Registered PHP Streams php, file, http, ftp, compress.bzip2, > compress.zlib, https, ftps > Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, > sslv2, tls > > > mysql > > MySQL Support enabled > Active Persistent Links 0 > Active Links 0 > Client API version 4.1.13 > MYSQL_MODULE_TYPE /no value/ > MYSQL_SOCKET /tmp/mysql.sock > MYSQL_INCLUDE /no value/ > MYSQL_LIBS /no value/ > > > Directive Local Value Master Value > mysql.allow_persistent On On > mysql.connect_timeout 60 60 > mysql.default_host /no value/ /no value/ > mysql.default_password /no value/ /no value/ > mysql.default_port /no value/ /no value/ > mysql.default_socket /no value/ /no value/ > mysql.default_user /no value/ /no value/ > mysql.max_links Unlimited Unlimited > mysql.max_persistent Unlimited Unlimited > mysql.trace_mode Off Off >
Attachment:
signature.asc
Description: OpenPGP digital signature