php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41906 slow local mysql_connect
Submitted: 2007-07-05 15:56 UTC Modified: 2007-07-06 09:29 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: kkr at mit dot de Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.3 OS: Windows 2000
Private report: No CVE-ID: None
 [2007-07-05 15:56 UTC] kkr at mit dot de
Description:
------------
Between 5.2.1 and 5.2.2 the PHP connects much slower to a local mysql5 installation running under apache/windows 2000. It now takes 5 seconds more to a simple connect which at least does work after that time.
In the changelog I've seen a new mysql client lib used starting from 5.2.2 upwards, anyone else has these problems too?
The 5.2.3 still has the same behavior. A connect is either via TCP or via named pipe/socket possible but slow. Local graphical frontends to the database are as fast as always. MySQL version is the latest released one 5.0.41.

Reproduce code:
---------------
the usual mysql_connect()

Expected result:
----------------
I expect a connect time from 200ms and experience 5500ms now.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-06 06:52 UTC] kkr at mit dot de
Using todays CVS snapshot the problem still exists. Very slow mysql connection still takes 5-6 seconds.
 [2007-07-06 09:09 UTC] tony2001@php.net
The connect is done by MySQL client library, not PHP.
PHP just provides an interface to it and cannot make your connection faster if it's slow.
 [2007-07-06 09:29 UTC] kkr at mit dot de
It's difficult to clearly seperate the php and mysql client part looking at this behaviour. All normal local applications connect fast enough to the local server, only the php takes loads of time. Can the php extension for mysql make any errors calling the mysql client lib? Is this lib statically compiled into the extension? Until now we stick with 5.2.1 version which is fine for the moment.
I will try the same combination on a different windows PC just to be shure.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 20:01:31 2024 UTC