Yii Framework Forum: MySQL ConnectionString? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

MySQL ConnectionString? Rate Topic: -----

#1 User is offline   kampre 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 26-October 08

Posted 29 October 2008 - 09:02 AM

I try MySQL for testdrive demo, but failed, here's my sample connectionString code:


'db'=>array('connectioonString'=>"'mysql:host=localhost;dbname=testdrive" Username="root" Password="1234"'


error message arise "could not find driver" but just work fine when I try using Prado-cli.php shell . and they can create class from table User at testdrive database, any clue? Thanks a lot.
0

#2 User is offline   kampre 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 26-October 08

Posted 29 October 2008 - 09:07 AM

Quote

I try MySQL for testdrive demo, but failed, here's my sample connectionString code:




'db'=>array('connectioonString'=>"'mysql:host=localhost;dbname=testdrive" Username="root" Password="1234"'




error message arise "could not find driver" but just work fine when I try using Prado-cli.php shell . and they can create class from table User at testdrive database, any clue? Thanks a lot.


single 'o' not double 'oo' on "connectionString" word  I just typed to fast in actually just one 'o' in my code. Thanks :D
0

#3 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,875
  • Joined: 04-October 08
  • Location:DC, USA

Posted 29 October 2008 - 10:41 AM

It should be:


'db'=>array(
  'connectionString'=>'mysql:host=localhost;dbname=testdrive',
  'username'=>'root',
  'password'=>'1234',
)

0

#4 User is offline   kampre 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 26-October 08

Posted 29 October 2008 - 11:54 AM

Quote

It should be:




'db'=>array(
  'connectionString'=>'mysql:host=localhost;dbname=testdrive',
  'username'=>'root',
  'password'=>'1234',
)


Great,, Thanks!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

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