View Single Post
  #1 (permalink)  
Old 04-11-2007, 02:22 PM
harvey harvey is offline
Junior Member
 
Join Date: Apr 2007
Posts: 2
Default Problem with connection to DB

Hi, can somebody help me with this problem? I am trying to connect to MySql DB like this :

PHP Code:
$params = array ('host' => ':/tmp/mysql50.sock',
                         
'username' => 'my_username',
                         
'password' => 'my_pass'
                         'dbname'   
=> 'my_db_name');

$db Zend_Db::factory('PDO_MYSQL'$params); 
And apache returns exeption like this :

Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[HY000] [2005] Unknown MySQL server host ':/tmp/mysql50.sock' (3)' in my_path/lib/Zend/Db/Adapter/Pdo/Abstract.php:102 Stack trace: #0 my_path/lib/Zend/Db/Adapter/Abstract.php(143): Zend_Db_Adapter_Pdo_Abstract->_connect() #1

some other stuff

thrown in my_path/lib/Zend/Db/Adapter/Pdo/Abstract.php on line 102

connection using mysql_connect() works OK.
Where should be problem? thanks for all answers.

Last edited by SpotSec : 05-02-2007 at 05:57 AM.
Reply With Quote