How to export MySQL with store procedures

Login to the server that you want to export the database and type:
mysqldump -u root -p --routines --triggers database_name > export-dbname.sql

Then copy the file to your local dev PC via scp, example:
scp root@yourserverIP:/tmp/export-dbname.sql /tmp

Import the above file to your DB.
mysql -u root -p
mysql>source /tmp/export-bname.sql;

All done, enjoy.

PS: Export of store procedures via phpmyadmin it doesn't work.

Posted on: 22/05/2012

How to compress a pdf file

It's been a while since I post a tip but this is a superb! If you've got a large pdf file, let's say 8MB and want to compress it down to 600kb then just type:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=flyer-small.pdf flyer-large.pdf

Posted on: 22/05/2012

Item 1 of 2 displayed.

Back to Home page