CDbConnection failed to open the DB connection.

HI,

‘db’=>array(

        'connectionString'=>'mysql:dbname=nidjapancorp_bs;hostname=mysql1103.xserver.jp;',


        'username'        =>'nidjapancorp_auto',


        'password'        =>'Pandia123',


        'charset'         =>'utf8',


        'enableProfiling' =>true,


        'schemaCacheID'        =>'fcache',


        'schemaCachingDuration'=>86400,


    ),

Got Error like this CDbConnection failed to open the DB connection…

But Normal Php Connections are working fine Why?

$conn = mysql_connect(‘mysql1103.xserver.jp’,‘nidjapancorp_auto’,‘Pandia123’);

if($conn)

{

echo "connectred";

}

$select =mysql_select_db("nidjapancorp_bs",$conn);

if($select)

{

echo "db Selected";

}

else

{

echo "Db Not seletcted";

}

For starters, try using [font="Courier New"]host[/font] instead of [font="Courier New"]hostname[/font] in your connection string.

Ya Thanx a lot Now working fine,May i know the difference between hostname and host?

But I run one server Its working fine but i changed other server i got error like

this.I cant understand that Difference if You dont mind please explain me?

Well, I think [font=“Courier New”]hostname[/font] is not really a valid part of the DSN ;)

Ok ThanK You buddy…