Trying to create a new app using mysql, used sqlite for the demo and had no problems. Changed main.php to:
'db'=>array(
'class'=>'CDbConnection',
'connectionString'=>'mysql:host=localhost;dbname=Eitilte',
'username'=>'eitilteuser',
'password'=>'4Ks%acG1Fu',
'emulatePrepare'=>true,
),
when I invoke the model command in the shell I get:
exception ‘CDbException’ with message ‘CDbConnection.connectionString cannot be empty.’ in /Users/dennisoconnor/yii-1.0.9.r1396/framework/db/CDbConnection.php:238
Using a terminal window I can connect to mysql and see the tables within the Eitilte database.
I can’t figure out why it thinks connectionString is empty.
I’m working on a MacBook Pro using Snow Leopard and it native PHP 5.3.0 environment
phpinfo(); shows:
PDO
PDO support enabled
PDO drivers mysql, sqlite, sqlite2
pdo_mysql
PDO Driver for MySQL enabled
Client API version mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $
Persistent cache enabled
put_hits 0
put_misses 0
get_hits 0
get_misses 0
size 2000
free_items 2000
references 2
Directive Local Value Master Value
pdo_mysql.cache_size 2000 2000
pdo_mysql.default_socket /var/mysql/mysql.sock /var/mysql/mysql.sock
any help would be greatly appreciated.
Dennis