mysql

# Import database from file
mysql -u [DB_USER] -p [DB_NAME] < data.sql

# Export database to file
mysqldump -u [DB_USER] -p [DB_NAME] > data.sql

# Enter "mysql" prompt
mysql -u [DB_USER] -p

# Run queries
create database learningLaravel;
show databases;

# Exit "mysql" prompt
CONTROL + C

For MAMP

See: Workspace > Mac Apps > MAMP

For Media Temple Grid

# Enter "mysql" prompt
mysql -h internal-db.s00000.gridserver.com -u [DB_USER]