1) Compiling and Installing MySQL 
With the program downloaded, you should make sure you're logged in as root before proceeding with the installation, unless you only want to install MySQL in your own home directory. Begin by unpacking the downloaded file and moving into the directory that is created:
tar xfz mysql-version.tar.gz
cd mysql-version
Next you need to configure the MySQL install. Unless you really know what you're doing, all you should have to do is tell it where to install. I recommend /usr/local/mysql:
./configure --prefix=/usr/local/mysql
After sitting through the screens and screens of configuration tests, you'll eventually get back to a command prompt. You're ready to compile MySQL:
After even more screens of compilation, you'll again be returned to the command prompt. You're now ready to install your newly compiled program:
make install
MySQL is now installed, but before it can do anything useful its database files need to be installed too. Still in the directory you installed from, type the following command:
With that done, you can delete the directory you've been working in, which just contains all the source files and temporary installation files. If you ever need to reinstall, you can just re-extract the mysql-version.tar.gz file.
Dan Fuhry 17th Oct 2006, 12:29am
You should probably make note of the fact that installing MySQL from the source code, even in your own home directory, can make your webhost very, VERY mad, because compiling MySQL will literally take all day and eat up tons of CPU time. The vast majority of Linux distributions come with MySQL either pre-installed or readily available for installation by way of a package management system. For example, in Fedora Core/Red Hat, type "yum install mysql" (as root, of course) and you'll be a database administrator in about ten minutes.