MySQL on the CLI


# Import - execute SQL
mysql -u username -p dbname < db.sql


# Export - db dump
mysqldump -u username -p dbname > db.sql