If you're using XAMPP, I don't think it's a php/mysql config problem.
that is precisely  the problem these *AMP stacks are designed to
avoid. However, you might want to try the following. Incidentally,
that should be "Applications" PLURAL in your path.

Open a terminal, and type:

    ps -af | grep mysql.sock           [enter]

The result on my machine is:

    sh-3.2# ps -ef | grep mysql.sock
              74  2405  2379   0   0:15.88 ??         1:57.74 /usr/
local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/
mysql/data --user=mysql --pid-    file=/usr/local/mysql/data/
Leopard.local.pid --port=3306 --socket=/tmp/mysql.sock
    0  4814  4805   0   0:00.01 ttys000    0:00.01 grep mysql.sock
sh-3.2#

see the last bit? port=3306 socket=/tmp/mysql.sock
that path (/tmp/mysql.sock) is the path to MY socket (and the port is
the port!) yours will be different because mine is not an *AMP stack.

Now, in your htdocs directory create phpinfo.php with <?php phpinfo() ?
> as the sole content. Make sure there is no new line after the ?>

View the file in Safari and halfway down the first screen is the path
to the loaded configuration file. This is the one you need to edit to
configure php. Continue down the page - you'll need to scroll about
halfway down and see if there is a mysql section. If there is, I don't
think you have a problem with php.ini. If there isn't, mysql isn't
talking to PHP and you'll need to find and edit the appropriate part
of the ini file.

If I remember correctly, XAMPP already has a phpinfo link.

I don't pretend that this is a solution, but if you post the results
here, at least we'll have something to work with.

Good luck.


On Jan 19, 8:46 pm, bookme <[email protected]> wrote:
> Thanks for your solution...but still not working.
>
> I tried both above solution but not working.
>
> I am using xampp on MAC OS..
> ERROR :  Can't connect to local MySQL server through Socket '/var/
> mysql/mysql.sock ?
>
> I also set envornment variable using
> echo 'export PATH=Application/xampp/xamppfiles/htdocs/clalumni/cake/
> console/cake:$PATH' >> ~/.bash_profile
> echo 'export PATH=Application/xampp/xamppfiles/lib/php:$PATH' >>
> ~/.bash_profile
>
> but still not able to run cake bake?
>
> Please help me to run cake bake on MAC OS.
> Thanks
>
> On Jan 19, 8:22 pm, leo <[email protected]> wrote:
>
> > I used to use MAMP. It used a non-standard port for the DB. Check
> > which port you're using and add it as shown in the database.php
> > comments:
>
> >  * host =>
> >  * the host you connect to the database.  To add a socket or port
> > number, use 'port' => #
> >  *
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to