XAMPP DB Import for Mac using Terminal

/Applications/XAMPP/xamppfiles/bin/mysql -u {username} -p {password} {db name} < {target .sql file}

So mysql on XAMPP has a file size limit on how large the imported .sql file can be. To get around this, there’s 2 solution:

  1. Increase the limit (though this wasn’t working for me).
  2. Import the db through terminal which bypass this limit.

The above command can be used by Mac users to import sql to their desired db on XAMPP. Note that you want to be where the target .sql file location is.