Any easy way to execute `.sql` scripts locally?

Hi,

You can get the dump of your prod .SQL to your local and connect to it. You can do this by using mysqldump.

On your local machine Mac.

  • Install mySQL using brew
  • login into mySQL using mysql -u root
  • Create a local database on your mySQL
  • Use your local database created using USE database_name
  • Source for the path where you have your local database using SOURCE inside your mySQL SOURCE /path/my_prod_database.sql
  • SHOW TABLES to be sure you have all
  • Connect to your database using your local config