« Rackspace vs. ServerBeach | Main | mysql_config not Displaying Options Correctly »

February 19, 2004

Build MySQL (4.0.18) from Source

The release of MySQL 4.0.18 gave me reason to revisit my recent packaging of MySQL (yea, it's only been a few days since I built it). There were two things bothering me about the package.

  1. I failed to speciy a user_id for the mysql user account created in the package, meaning it would assign the next default number and I'd rather have a specific id assigned on each machine. Easy to fix in the preinstall script.
  2. I used the precompiled binary of MySQL for Solaris, not a bad thing but I at least wanted to look into what I might gain from compiling it myself. I have compiled in the past, but I guess MySQL folks got to me with this line:
    For maximum stability and performance, we recommend that you use the binaries we provide.
As expected, the MySQL docs has good information about configure options and how compiling and linking affects performance. Documentation also contains a listing of compile options used when creating the prebuilt binaries.

It appears that I can add a few things to the compiler flags used to make the prebuilt binary to further optimize MySQL (specifically for UltraSPARC machines).

The compiler args and configure options I settled on after reading through the docs:

CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mcpu=v8 -Wa,-xarch=v8plusa" ./configure --prefix=/usr/local/mysql-4.018 --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-curses-libs=-lcurses --disable-shared --with-mysqld-user=mysql --without-isam --with-named-z-libs=no
. . . waiting for make and make test to finish.

Posted by mike at February 19, 2004 2:59 PM

Hard Drive Recovery Group offers hard disk data recovery services for RAID, laptops and servers. Complete clean room and hard drive repair service.

Trackback Pings

TrackBack URL for this entry:
http://mike.kruckenberg.com/mt/mt-tb.cgi/502

Comments

Yo Mike Kruckenberg!
We're trying to reach you. Michael just finished and is sending out to old friends a copy of the first of 3 CDs that contain music he's written since the age of 15. We of course thought of you right away--can you email us or call us SOON? I know Michael would LOVE to get in touch with you again--
Glad to see that things are looking so great for you & Heidi and your cute little kids. We have our own little bugger--Liam. He is almost 1 years old and we've been living in Denver since 1996. But more about that later--email us or call us ok?
=-) Michael & Twana Weiler
michaeltwana@yahoo.com
(720) 479-8268

Posted by: Twana & Michael Weiler at February 26, 2004 4:27 PM