To Fix SQLSTATE[HY000] [1045] Access denied for user 'username'@'localhost' (using password: YES) Error just Set the socket. Here you have to just set the socket: unix_socket: /Applications/MAMP/tmp/mysql/mysql.sock