Installing MySQL 3.x.x from Source on Linux
by Nathan Wallace (Oct 22, 1999)
Introduction
These instructions describe the installation of
MySQL from source. They should work for most linux distributions.
The process is completely identical to installing from binaries except for the Installing section. In fact, to prevent duplication these instructions point you to the post install part of the binary installation.
Before We Begin
- These instructions assume that you are working as root.
su root
Getting MySQL
- You can determine the latest stable version of MySQL at the downloads page. For this installation I'm using MySQL 3.22.27.
- Download the binary distribution for PC Linux. Save it into your /usr/local/downloads directory. If you haven't already created a downloads directory you can do so now with:
mkdir /usr/local/downloads
Then we can download the distribution:
cd /usr/local/downloads
ftp ftp.mysql.com (user: anonymous password: email address)
cd MySQL-3.23
bin
get mysql-3.23.28-gamma.tar.gz
bye
Installing MySQL
- Unpack the MySQL download into the source directory on your machine (NB: that's a capital C):
tar xzf mysql-3.23.28-gamma.tar.gz -C /usr/local/src
- Configure the installation.
cd /usr/local/src/mysql-3.23.28-gamma
./configure --prefix=/usr/local/mysql
- Make and install the binaries. These steps will take a long time:
make
make install
Post Install Instructions
The post install process on most systems is identical to that for the
MySQL installation from binaries. You still need to configure your installation, setup users, and so on, so start at the
Configuring MySQL section.
There might be some small differences since some scripts are still in the source directory structure, not the installed one. For example, mysql_install_db is located in the scripts directory in the /usr/local/src structure. You should be able to find most things pretty easily.