Import big MySql databases with command line
SSH your server and dump the database in your website folder
ssh root@yourserver.com 'mysqldump -u db_username -p db name > /var/www/vhosts/mysite.com/shop/filename.sql'
download filename.sql with curl
curl -Ov http://trendland.com/dbbk/filename.sql
and finally import into your local database
mysql -p -u db_username db_name < filename.sql
If you use MAMP your mysql is here
/Applications/MAMP/Library/bin/mysql
Note: you may want to use rsync instead of curl
Written by Federico Ulfo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mysql
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#