Hi
I am trying to do the Simple Acl controlled Application tutorial in the cakephp cookbook. The idea is :
Making Databases
CREATE TABLE users (
id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) NOT NULL UNIQUE,
password CHAR(40) NOT NULL,
group_id INT(11) NOT NULL,
created DATETIME,
modified DATETIME
);
CREATE TABLE groups (
id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
created DATETIME,
modified DATETIME
);
CREATE TABLE posts (
id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
user_id INT(11) NOT NULL,
title VARCHAR(255) NOT NULL,
body TEXT,
created DATETIME,
modified DATETIME
);
CREATE TABLE widgets (
id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
part_no VARCHAR(12),
quantity INT(11)
);
Then run the cake bake all command, this is when i have the problem :
Welcome to CakePHP v1.2.4.8284 Console
---------------------------------------------------------------
App : app
Path: /Applications/MAMP/htdocs/luis/app
---------------------------------------------------------------
---------------------------------------------------------------
Bake All
---------------------------------------------------------------
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /Applications/MAMP/htdocs/luis/cake/libs/model/datasources/dbo/dbo_mysql.php on line 374
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/luis/cake/libs/model/datasources/dbo/dbo_mysql.php on line 379
Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/luis/cake/libs/model/datasources/dbo/dbo_mysql.php on line 387
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/luis/cake/libs/model/datasources/dbo/dbo_mysql.php on line 411
Error: Your database does not have any tables.
My database config is like this :
var $default = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'port' => 8889,
'login' => 'root',
'password' => 'root',
'database' => 'cake',
);
So i am using the last CakePHP Version (1.2.5), the last Mamp version (1.7.2) running PHP v5... Somebody knows what is the problem ?