Slow connection to Linux MySQL from Windows only (XAMPP)

Posted by Josh on Server Fault See other posts from Server Fault or by Josh
Published on 2012-09-13T15:37:55Z Indexed on 2012/09/13 15:39 UTC
Read the original article Hit count: 241

Filed under:
|
|
|
|

I'm having a problem with a PHP project (using Kohana 3.2 framework) on my Windows 7 64-bit machine connecting to the database. The development database is stored on a Ubuntu Linux server on the local network. Other development machines running OSX and Linux are connecting fine. There are no other Windows development machines to test with.

I can access MySQL fine using MySQL Workbench, and other projects (which I believe to be less database heavy) run mostly ok, only occasionally getting timeout messages.

I'm constantly getting

Maximum execution time of 30 seconds exceeded

when functions such as mysql_query() are run in this particular project. Specifically, the Kohana file where the timeout occurs is MODPATH\database\classes\kohana\database\mysql.php [ 186 ].

My local set-up is:

  • Windows 7 Professional 64bit
  • XAMPP 1.7.7 (PHP 5.3.8)

The output of uname -a of the Linux server is:

Linux peach 2.6.38-11-server #50-Ubuntu SMP Mon Sep 12 21:34:27 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

I've tried the following, with no success:

  • Disabling Windows firewall
  • Switching between using a persistant and normal connection
  • In my.cnf, adding
    • skip-name-resolve
    • Increasing wait_timeout
    • Enabling bind-address

I've run out of ideas now, and have no idea how to debug an odd issue like this.

Has anyone come across this before, or have any idea how I could find the root of the issue, or what might be the problem?

© Server Fault or respective owner

Related posts about Windows

Related posts about ubuntu