drush migrate:status comes back with SQLSTATE [hy000] [2002] No such file or directory Using drush on my macOS. Using Nginx and MYSQL through brew. Website is running fine. The other drush commands work fine, drush cr, drush cc, etc. But running drush migrate:status or drush ms results in

 error SQLSTATE [hy000] [2002] No such file or directory 


in terminal. same for all migrate drush commands.

Running Drupal 8.8.5 Lightning Distro. 

My settings.php is set up 127.0.0.1 but still no luck.
I had this problem when upgrading/downgrading php to work with drush migrate. Check if the mysql.sock is right in php.ini:

First check what php.ini file is used in terminal:

php --ini


Then open the php.ini file and change/add:

pdo_mysql.default_socket=/Applications/MAMP/tmp/mysql/mysql.sock


or the mysql.sock you are using. To find your mysql socket in terminal use:

mysql_config --socket