Warnung: file_put_contents(/home/www/web1/html/php_dev/test.txt) [function.file-put-contents]: failed to open stream: Permission denied in /home/www/web1/html/php_dev/sys/lib.activity.php (Zeile 58)
WAMP Win/ME MySQL Error: #2003, Cant connect to MySQL server on localhost (10050) [Archiv] - PHP-Scripte PHP-Tutorials PHP-Jobs und vieles mehr
ebiz-webhosting
- Ad -
php-resource




Archiv verlassen und diese Seite im Standarddesign anzeigen :
WAMP Win/ME MySQL Error: #2003, Cant connect to MySQL server on localhost (10050)


 
hand
08-12-2001, 08:09 
 
Ich betreibe seit Jahren LAMP ohne Probleme, kenne php.ini, my.cnf und dergleichen.
Ich wollte nun eine WAMP Installation unter Win/ME versuchen und komme nicht zurecht. Es fehlt vermutlich eine Kleinigkeit. Vielleicht irgendeine DLL die ich vergessen habe zu kopieren - ich weiß es nicht. Ich hoffe Ihr könnt helfen.

Meine Quellen waren die readmes und install.txts sowie http://www.cgi-now.de/wamp.html

STATUS:
Apache funktioniert
PHP funktioniert
MySQL funktioniert über LineCommand mysql
MySQL funktioniert nicht über PHP

Fehler bei Connect zu MySQL über PHP
Warning: MySQL Connection Failed: Can't connect to MySQL server on 'localhost' (10050) in ...
MySQL Error: #2003, Can't connect to MySQL server on 'localhost' (10050)

FRAGEN:
Ich finde in der MySQL-Literaur nirgendwo einen "Messages & Codes oder Errors Guide" wo Error-Nummern beschrieben sind?
Wer weiß was mysql_errno() "2003" im Zusammenhang mit (10050) bedeuted?
Wohin muß my.cnf kopiert werden, damit Sie beim mysqld-Start verwendet wird? (das ist aber ein Randproblem - wesentlich ist der Connect-Error, die jetzige habe ich unter c:\, zieht aber nicht) Was habe ich vergessen?

(Der selbe Fehler tritt auch auf, wenn mysqld nicht gestartet ist. Also echt ein Kommunikationsproblem mit PHP und MySQL)

DETAILS:
apache_1.3.22-win32-x86.exe auf C:\Programme\Apache Group\Apache
php-4.0.6-Win32.zip auf C:\php
mysql-3.23.46-win.zip auf C:\mysql

httpd.conf
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php

php4ts.dll wurde nach c:\windows\system kopiert

php.ini in C:\windows
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.

Startup und Reihenfolge
C:\mysql\bin>mysqld
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add for example,
innodb_data_file_path = /mysql/data/ibdata1:20M
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 7.6 at http://www.mysql.com/doc/

MySQL-Test via Linecommand:
C:\mysql\bin>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.46-max-debug
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>

Start Apache in Console
Apache/1.3.22 (Win32) PHP/4.0.6 running...

Browser-Start
Ergebnis von phpinfo();
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.32

Directive Local Value Master Value
mysql.allow_persistent On On
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

Connect mit Database über PHP
$P_DBSRV = "localhost";
$P_DBUID = "root";
$P_DBPWD = "";
$P_DBLNK = mysql_connect("$P_DBSRV", "$P_DBUID", "$P_DBPWD" ) or mysql_die();

Warning: MySQL Connection Failed: Can't connect to MySQL server on 'localhost' (10050) in ...
MySQL Error: #2003, Can't connect to MySQL server on 'localhost' (10050)

Fazit:
Apache funktioniert
PHP funktioniert
MySQL funktioniert über LineCommand mysql
MySQL funktioniert nicht über PHP

Fragen:
Ich finde in der MySQL-Literaur nirgendwo einen "Errors Guide" wo Error-Nummern beschrieben sind.
Wer weiß was mysql_errno() "2003" im Zusammenhang mit (10050) bedeuted?
Wohin muß my.cnf kopiert werden, damit Sie beim mysqld-Start verwendet wird? (das ist aber ein Randproblem - wesentlich ist der Connect-Error, die jetzige habe ich unter c:\, zieht aber nicht) Was habe ich vergessen?

[Editiert von hand am 08-12-2001 um 08:18]

 
deepthougt
08-12-2001, 15:19 
 
hi,
auf http://www.phpwelt.de findest Du in der Rubrik "Tutorials" die Installationsanleitung für
Windows ME.

Grüße
Deep

 
hand
08-12-2001, 18:14 
 
Sorry ich finde nur für WAMP / XP, nicht für ME.
ME ist auch ein schlechter Suchbegriff.

 
hand
09-12-2001, 15:25 
 
Ursache gefunden!

Über Personal Firewall "ZoneAlarm" hatte ich Apache geblockt.
Ich mußte 127.0.0.1 zu den Trusted Hosts hinzufügen und den Zugriff auf Apache aus dem lokalen Netzwerk gestatten (Allow connect from local).

Es läuft.

 
slatko
02-07-2003, 15:35 
 
tja, auch satte 1 1/2 jahre später ist so ein forumsbeitrag noch von nutzen, die sache mit dem zone alarm war auch bei mir der knackpunkt damit es auf ME funzt - Danke Hand, danke Forum !

 
hand
03-07-2003, 12:53 
 
:grin:

 
sputnik86
12-11-2007, 00:10 
 
hi zusammen,

ich habe das gleiche problem und zwar erhalte ich über navicat die fehlermeldung "2003 - cant connect to mysql server on ´localhost´ (10061), allerdings liegt es bei mir nicht an zone alarm, da ich keine software firewall installiert habe... ich benutze winXP mit service pack 2.

bin über jede hilfe dankbar!

mfg

- -

Alle Zeitangaben in WEZ +2. Es ist jetzt 17:09 Uhr.