Re: Cake Bake cannot connect to my database

2013-01-01 Thread Fernando Fl
Try to use:

Terminal:
sudo mkdir /var/mysql

sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock


Em sexta-feira, 21 de outubro de 2011 13h34min04s UTC-4, Nate escreveu:

 In manually setting everything up, I'm able to successfully add, 
 modify, view, and remove products with scaffolding enabled. 

 However, when I go into Bake, and I choose to create a [C]ontroller - 
 it then asks for my database (default).  I confirm that setting and I 
 get this error: 

 Warning Error: PDO::__construct(): [2002] No such file or directory 
 (trying to connect via unix:///var/mysql/mysql.sock) in [/Users/nate/ 
 Sites/tor.local/html/lib/Cake/Model/Datasource/Database/Mysql.php, 
 line 160] 

 Any ideas? Thanks

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Cake Bake cannot connect to my database

2011-10-21 Thread Nate
In manually setting everything up, I'm able to successfully add,
modify, view, and remove products with scaffolding enabled.

However, when I go into Bake, and I choose to create a [C]ontroller -
it then asks for my database (default).  I confirm that setting and I
get this error:

Warning Error: PDO::__construct(): [2002] No such file or directory
(trying to connect via unix:///var/mysql/mysql.sock) in [/Users/nate/
Sites/tor.local/html/lib/Cake/Model/Datasource/Database/Mysql.php,
line 160]

Any ideas? Thanks

-- 
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


Re: Cake Bake cannot connect to my database

2011-10-21 Thread majna
It's PDO error.
Try to use 127.0.0.1 instead of localhost in database.php


When you run PHP from CLI - command line, usually there's another php.ini 
file, so look for it.
Or google eg. 
http://stackoverflow.com/questions/1435445/error-on-creating-connection-to-pdo-in-php

-- 
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


Re: Cake Bake cannot connect to my database

2011-10-21 Thread Nate
Awesome!

Changing 'localhost' to '127.0.0.1' worked :)

Thanks!

-- 
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