Q
Q
Quiz2010-12-17 19:47:26
PHP
Quiz, 2010-12-17 19:47:26

Slows down mysql_connect();

Situation


There are three cars:
  • Server (CentOS)
  • Developer 1 (Windows 7)
  • Developer 2 (Windows XP x86)

Installed PHP versions:
Server - 5.2.12
Developer 1 - 5.2.13
Developer 2 - 5.3.0

Results of mysql_connect('localhost', 'user', 'pass'):
Server - ~0.0012
Developer 1 - ~0, 52
Developer 2 - ~0.001

The problem is NOT in the MySQL server - 100%.
In addition, tested on virtual machines - the results are approximately the same.
The problem is specific to this machine.

Has anyone encountered a similar problem?
Does she have a solution?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
Q
Quiz, 2010-12-17
@Quiz

Actually, a solution has been found - install PHP from the 5.3.x branch or <5.2.12
Starting from build 5.2.13, apparently, changes were made to libmysql that affect performance.

A
Andrew, 2010-12-17
@Morfi

In Windows 2008 there was a problem that you need to specify 127.0.0.1 and not localhost

H
homm, 2010-12-18
@homm

Have you tried turning off your antivirus?

V
Vladimir Chernyshev, 2010-12-18
@VolCh

Are the client and server versions the same?

V
Vlad, 2011-09-06
@wildvampir

Another solution is to register
127.0.0.1 localhost in the hosts file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question