Skip to content

Instantly share code, notes, and snippets.

@cballenar
Last active February 18, 2016 22:10
Show Gist options
  • Save cballenar/a20dce0d0047d20a2dff to your computer and use it in GitHub Desktop.
Save cballenar/a20dce0d0047d20a2dff to your computer and use it in GitHub Desktop.
Starting with Laravel

Starting with Laravel on Mac OSX

Installation

Install composer

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Install Laravel

composer global require "laravel/installer=~1.1"

Add Laravel to bash

# edit .bash_profile
vi .bash_profile

# add the following line
export PATH=~/.composer/vendor/bin:$PATH

# restart terminal

Source

http://code.tutsplus.com/tutorials/quick-tip-installing-laravel-5--cms-23160

When running

→ php artisan migrate:install

  [PDOException]                                    
  SQLSTATE[HY000] [2002] No such file or directory  

Solution

The solution seems to be create a symlink from /var/mysql/mysql.sock to /Applications/MAMP/tmp/mysql/mysql.sock.

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

Source

http://forumsarchive.laravel.io/viewtopic.php?id=980

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment