Failing to Compile MySQL

I was installing my system from scratch today. This is a clean install, so I need to install all Unix command-line tools I need. Luckily, though, Leopard comes with updated and new tools such as ruby, rails and svn. But, it doesn’t come with MySQL.

I’m not a user of MacPosts or Fink, so I referred to Dan Benjamin’s tutorial on compiling MySQL. I followed every single step, but I failed and failed. After looking into the problem, I noticed what was wrong.

The problem is that my download of the souce file “mysql-5.0.45.tar.gz” was not complete. I don’t know how curl command works, but here are steps I took instead.

  1. Make a folder named “src” at my home folder
  2. Download the source file and put the file to the src folder. (It says “Compressed GNU TAR archive (tar.gz)” As of this writing, the latest version is 5.0.51.)
  3. Double click the source file to extact files. Here, a folder will show up full with files. (This stem is equivalent to tar command in the tutorial)
  4. Using Terminal, type in cd ~/src/[folder_made_in_step3]. (The name of the folder depends on the name of the source file. The tutorial says “mysql-5.0.45”, but it’s totally up to what version to the source file you downloaded.)

Then, you can start to configure MySQL following the tutorial.