Mailinglisten-Archive |
Auf der selben Maschine läuft phpMyAdmin..das funktioniert einwandfrei.
Weiss einer wo ich bei phpMyAdmin was abgucken kann ?
-----Original Message-----
From: php-bounces at phpbar.de [mailto:php-bounces at phpbar.de] On Behalf Of Sebastian Mendel
Sent: Thursday, November 10, 2005 1:10 PM
To: deutschsprachige PHP-Mailingliste
Subject: Re: [php] Mysql_connect
Norbert Pfeiffer wrote:
> Hi,
>
>> Was läuft hier schief ?
> hmm,
> wo bzw. worauf[OS] laeuft denn was schief ...
>
> Mir ist es z.B. noch nie gelungen unter Win32 eine Socketverbindung
> zum MySQL-Server aufzubauen.
also bei mir funktionierts:
in der my.ini:
[mysqld]
enable-named-pipe
...
und mit dem Punkt '.' als host nimmt PHP den 'named pipe'
<?php
function mc( $host ) {
$r = mysql_connect( $host, 'root', '' );
echo 'MySQL-Connect: ';
var_dump( $r );
echo "<br />\n";
echo 'MySQL-Error: #';
echo mysql_errno();
echo ': ';
echo mysql_error();
echo "<br />\n";
echo 'MySQL-Host Info: ';
echo mysql_get_host_info();
echo "<hr />\n";
mysql_close();
}
mc( '127.0.0.1' );
mc( 'localhost' );
mc( '.' );
?>
sieht bei mir so aus:
MySQL-Connect: resource(2) of type (mysql link)
MySQL-Error: #0:
MySQL-Host Info: 127.0.0.1 via TCP/IP
-----
MySQL-Connect: resource(3) of type (mysql link)
MySQL-Error: #0:
MySQL-Host Info: localhost via TCP/IP
-----
MySQL-Connect: resource(4) of type (mysql link)
MySQL-Error: #0:
MySQL-Host Info: Named pipe: MySQL
--
Sebastian Mendel
www.sebastianmendel.de
www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet
--
** Allgemeine deutschsprachige PHP-Liste: php at phpbar.de **
Informationen: http://www.phpbar.de
http://lists.phpbar.de/mailman/listinfo/php
php::bar PHP Wiki - Listenarchive