Xampp 1.8 mysql connect slow
Posted: 03. August 2012 20:16
I have just done a fresh install of Xampp 1.8 (following all the "do this first" warnings) and it works.
The only problem is that connecting to mysql is soooo slow.
any pages with php arrive quickly when I navigate to localhost in the browser on the server machine.
If there is a mysql connect statement in the php then it is really slow.
I have timed the connection in the php code and it usually takes more than 1 second to connect to mysql, a query then runs in less than 4ms.
I have tried restarting mysql with the skip-name-resolve option as suggested by many others who had the problem (after googleing for a while), this causes warnings to appear:
Warning: mysql_connect(): Access denied for user...
and so I cannot query the database and everything is useless and even slower.
How can I fix this?
Thanks.
The only problem is that connecting to mysql is soooo slow.
any pages with php arrive quickly when I navigate to localhost in the browser on the server machine.
If there is a mysql connect statement in the php then it is really slow.
I have timed the connection in the php code and it usually takes more than 1 second to connect to mysql, a query then runs in less than 4ms.
I have tried restarting mysql with the skip-name-resolve option as suggested by many others who had the problem (after googleing for a while), this causes warnings to appear:
Warning: mysql_connect(): Access denied for user...
and so I cannot query the database and everything is useless and even slower.
How can I fix this?
Thanks.