I am always amazed at some of the small things that I think would be easy to find a solution for, seem so ellusive.

Today, I needed to run a quick mysqldump of a 100MB database, and I needed to compress it on the fly to gzip so I did not end up with 2 files on my disc. Just save room and time.

mysqldump -u myusername -h localhost -p dbname | gzip -9 > dbname.sql.gz

Then I get prompted for the username’s password, and there I have it!

Mick Knutson

Java, JavaEE, J2EE, WebLogic, WebSphere, JBoss, Tomcat, Oracle, Spring, Maven, Architecture, Design, Mentoring, Instructor and Agile Consulting. http://www.baselogic.com/blog/resume

View all posts

Java / JavaEE / Spring Boot Channel

BLiNC Supporters

BLiNC Adsense