hello all,
I work on a MAMP box with this configuration:
... 'db'=>array( 'class'=>'CDbConnection', 'connectionString'=>'mysql:host=localhost;dbname=foto','username'=>'root', 'password'=>'**', 'charset'=>'utf8', ), ...
when i go into yiic with correct php version (/Applications/MAMP/bin/php5/bin/php)
and execute 'model user', it says 'Warning: the table 'user' does not exist in the database.'
But in my database foto a table user does exist!
SET NAMES latin1; SET FOREIGN_KEY_CHECKS = 0; CREATE TABLE `user` ( `UsrId` int(11) NOT NULL auto_increment, `UsrName` varchar(255) NOT NULL, `UsrPassword` varchar(50) NOT NULL, PRIMARY KEY (`UsrId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; insert into `user` values('1','sss','ssssss'); SET FOREIGN_KEY_CHECKS = 1;
Shouldn't I use the socket for my mysql? (:/Applications/MAMP/tmp/mysql/mysql.sock) But I don't know how to use that in my DSN, And yiic doesn't say that it cannot find the database foto.
Any suggestions?