mysql php connection problem in windows 7

Posted by air on Stack Overflow See other posts from Stack Overflow or by air
Published on 2010-02-17T14:10:26Z Indexed on 2010/04/02 15:23 UTC
Read the original article Hit count: 225

Filed under:
|
|

i install windows7 ultimate and php 5.3.1 and mysql server 5.1

mysql server work fine from

                  mysql>

and if see phpinfo();

i get the following table

              mysql
       MySQL Support enabled 
      Active Persistent Links  0  
      Active Links  0  
      Client API version  mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $  
      Persistent cache enabled 
      put_hits  0  
      put_misses  0  
      get_hits  0  
      get_misses  0  
      size  2000  
       free_items  2000  
      references  2  

but when i connect with following php command

   $db_host="localhost"; 
   $db_name="mysql";
   $db_user="root";
   $db_pass="*****"; 

   $dbc=mysql_connect($db_host,$db_user,$db_pass) OR DIE (mysql_error());
   $dbs=mysql_select_db($db_name) OR DIE (mysql_error());

when i run page, page take long time in loading and then return nothing. and if i pass any query it return false, i think its connection problem.

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql