I am currently trying to bake models for a project in CakePHP. I have
set up my database tables and baked my skeleton project. I then
execute the following via terminal:

cake bake -app /home/gary/glecto/
Which then display's me the correct menu. When I choose "M" I get the
following error

PHP Warning:  mysql_connect(): Can't connect to local MySQL server
through socket '/var/run/mysqld/mysqld.sock' (2) in /usr/share/php/
cake/libs/model/datasources/dbo/dbo_mysql.php on line 540

Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/var/run/mysqld/mysqld.sock' (2) in /usr/share/php/cake/libs/
model/datasources/dbo/dbo_mysql.php on line 540
PHP Warning:  mysql_select_db() expects parameter 2 to be resource,
boolean given in /usr/share/php/cake/libs/model/datasources/dbo/
dbo_mysql.php on line 546

Warning: mysql_select_db() expects parameter 2 to be resource, boolean
given in /usr/share/php/cake/libs/model/datasources/dbo/dbo_mysql.php
on line 546
PHP Warning:  mysql_get_server_info() expects parameter 1 to be
resource, boolean given in /usr/share/php/cake/libs/model/datasources/
dbo/dbo_mysql.php on line 554

Warning: mysql_get_server_info() expects parameter 1 to be resource,
boolean given in /usr/share/php/cake/libs/model/datasources/dbo/
dbo_mysql.php on line 554
PHP Warning:  mysql_query() expects parameter 2 to be resource,
boolean given in /usr/share/php/cake/libs/model/datasources/dbo/
dbo_mysql.php on line 588

Warning: mysql_query() expects parameter 2 to be resource, boolean
given in /usr/share/php/cake/libs/model/datasources/dbo/dbo_mysql.php
on line 588
Your database does not have any tables.
Does anyone have any ideas on how I could solve this? I've been
scratching my head for hours.

Connection code

class DATABASE_CONFIG {

    var $default = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => 'localhost',
        'port' => 3306,
        'login' => 'root',
        'password' => '',
        'database' => 'glectoMVC',
    );
}

Also - If I look at the cakePHP generated startup page it confirms
that my database connection is OK.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to