onsdag 9 mars 2016

The MySQL binary package have been growing a lot the last GA versions. I wrote a blog post on creating a minimal installation a bit over a year ago and after this we have seen some interesting posts by Mablomy and Giuseppe on creating smaller installations of MySQL for different purposes.

I will continue where Mablomy left off and use UPX to try to shrink the MySQL binary even more. UPX (Ultimate Packer for Executables) is a free and open source executable packer supporting a number of file formats from different operating systems. If you want to read more I recommend the link above or the manual page once you have installed upx.

Using the default installation of MySQL 5.7 and then running strip(1) to remove symbol information the mysqld binary goes down in size from 240MB to 26MB.

Next step is to compress the MySQL binary using UPX.
I'm using Ubuntu 14.04 and installed UPX via Ubuntu repositories like: sudo apt-get install upx
After this run upx on mysqld binary to shrink it further.