mysql server: cannot connect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I got "cannot connect" error when I did stress test for a project we did 
recently. We used Apache Jmeter and there were 5 concurrent connections in a 
second.
Initially, I thought it could be because of MySQL, becuase the first page of 
the project runs a lot of queries.
Then I did the simple script below and start Jmeter once again.

<?
$conn = mysql_connect ( '10.0.1.4', 'root', '') or die("Could not connect: " 
. mysql_error());
mysql_select_db('lub2', $conn);
$res = mysql_query("SELECT * FROM pages_lv0 WHERE id = 1", $conn) or 
die("Invalid query: " . mysql_error());
mysql_close($conn);
?>

I got the same error again and checked MySQL server. I managed to connect to 
the server and noticed that it is woriking fine, but I still was unable to 
connect to the server via the script. I moved MySQL database to our Linux 
server and repeated the test. The result was the same. Then I moved the PHP 
script to the Linux server and run test once again. I did not get the error. 
I moved database back to windows, left PHP on Linux and run the test. No 
error. I compared settings in php.ini on both Linux and Windows and they 
were the same. So I conclude this is PHP bug or feature under the Windows 
platform.

Does anyone met the same problem before? I searched for the answers in the 
newslist, but did not find anything related to the same type of problem. I 
found one post in the bugs database (and I already submited this problem as 
a bug), but support team said it is not a bug. 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux