- Pulled a perfectly working laravel project from a git into a mac running MAMP. Project ran perfectly on a linux machine.
- composer install
- php artisan migrate, got the following error: - [PDOException] SQLSTATE[HY000] [2002] No such file or directory
NB: php -v is 5.5 and mysql -v is 5.5 from the terminal Here is part of my config/database.php
    'mysql' => array(
        'driver'    => 'mysql',
        'host'      => 'localhost',
        'database'  => 'essays',
        'username'  => 'root',
        'password'  => 'root',
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => '',
    ),
I tried replacing localhost with 127.0.0.1 with no avail. Kindly help..
Edit: I added these three lines in my php.ini
mysql.default_socket = /var/run/mysqld/mysqld.sock
mysqli.default_socket = /var/run/mysqld/mysqld.sock
pdo_mysql.default_socket = /var/run/mysqld/mysqld.sock
I also added this symlink:
sudo mkdir /var/mysql
cd /var/mysql && sudo ln -s /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
But that didnt solve. I also pulled a fresh new laravel project from git and ran into the same error after composer install then php artisan migrate
 [PDOException]                                    
  SQLSTATE[HY000] [2002] No such file or directory 
The mac version is 10.7.4
 
     
     
     
     
     
     
     
     
     
     
     
     
     
    