Laravel: No such file or directory (SQL: create table 'migration')


Open database file from config/database.php


Update values as below:
  • Database name in DB_DATABASE
  • Username (root) in DB_USERNAME
  • Password (root for mac, blank for windows) in DB_PASSWORD

Important: you have to change value for unix_socket
add /Applications/MAMP/tmp/mysql/mysql.sock for 
unix_socket.
'unix_socket'  => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
Now run command for rollback
php artisan migrate rollback