Yii Framework Forum: connect with remote database usign Yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

connect with remote database usign Yii Rate Topic: -----

#1 User is offline   mostofa 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 30-June 12

Posted 04 July 2012 - 12:58 AM

Here I Got Problem when i want to connect with A remote database.
My full working progress is step by step declared below:

1. I have a database located in a host: and its a linux server path:/var/lib/mysql/mysql.sock
2. And I wanted to connect it from another host: using a Yii->CDbConnection class
3. I give permission from the Mysql DATABASE ENGINE in that database which i want to access from
4. the permission is any host
5. but the problem is giving that

its already successfully connected with core function of mysql
such as:
mysql_connect('','user','password' );

and return data that i want

but also try with PDO
the same problem is giving that is giving in Yii CDbConnection

my syntax writing of Yii:
$con=new CDbConnection($dsn,$user,$pass);
but its giving error this:

SQLSTATE[28000] [1045] Access denied for user 'author'@'localhost' (using password: YES)

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,558
  • Joined: 12-October 09
  • Location:Croatia

Posted 04 July 2012 - 02:06 AM

The first thing I noticed is that you set the username "user" but the error say "author" - ???
Find more about me.... btw. Do you know your WAN IP?

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users