2.9.3 Installing MySQL Using a Development Source Tree

This section describes how to install MySQL from the latest
development source code, which is hosted on
GitHub. To obtain the
MySQL Server source code from this repository hosting service, you
can set up a local MySQL Git repository.

On GitHub, MySQL Server
and other MySQL projects are found on the
MySQL page. The
MySQL Server project is a single repository that contains branches
for several MySQL series.

MySQL officially joined GitHub in September, 2014. For more
information about MySQL's move to GitHub, refer to the
announcement on the MySQL Release Engineering blog:
MySQL
on GitHub

Prerequisites for Installing from Development Source

Setting Up a MySQL Git Repository

To set up a MySQL Git repository on your machine, use this
procedure:

Clone the MySQL Git repository to your machine. The
following command clones the MySQL Git repository to a
directory named mysql-server. The
initial download will take some time to complete, depending
on the speed of your connection.

To view the branches that are checked out in your local
repository, issue the git branch command.
When you cloned the MySQL Git repository, the MySQL 5.7
branch was checked out automatically. The asterisk
identifies the 5.7 branch as the active branch.

~/mysql-server$ git branch
* 5.7

To check out a different MySQL branch, run the git
checkout command, specifying the branch name. For
example, to checkout the MySQL 5.6 branch:

~/mysql-server$ git checkout 5.6
Branch 5.6 set up to track remote branch 5.6 from origin.
Switched to a new branch '5.6'

Run git branch again to verify that the
MySQL 5.6 branch is present. MySQL
5.6, which is the last branch you checked out,
is marked by an asterisk indicating that it is the active
branch.

~/mysql-server$ git branch
* 5.6
5.7

The git checkout command is also used to
switch branches. For example, to make MySQL 5.7 the active
branch again, you would run git checkout
5.7.

To obtain changes made after your initial setup of the MySQL
Git repository, switch to the branch you want to update and
issue the git pull command:

~/mysql-server$ git checkout 5.6
~/mysql-server$ git pull

To examine the commit history, use the git
log option:

~/mysql-server$ git log

You can also browse commit history and source code on the
GitHub MySQL
site.