I am running a local MAMP machine on my Mac. Laravel running in production environment. Laravel is able to access the MySQL DB on php pages I display through the browser, yet when I am running php artisan migrate
in Terminal, I receive
[PDOException]
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
app/config/database
:
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'laravel1',
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'port' => '8889'
),
ATTEMPTED SOLUTION:
Adding 'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock'
(path designated in /Applications/MAMP/bin/startMysql.sh
) to app/config/database
.
Results in error:
[PDOException]
SQLSTATE[HY000] [2002] No such file or directory
Help appreciated.