2.11.3. Installing MySQL from a Development Source Tree

This section discusses how to install MySQL from the latest development source code. Development trees have not necessarily received the same level of testing as standard release distributions, so this installation method is usually required only if you need the most recent code changes. Do not use a development tree for production systems. If your goal is simply to get MySQL up and running on your system, you should use a standard release distribution (either a binary or source distribution). See Section 2.1.3, “How to Get MySQL”.

MySQL development projects are hosted on Launchpad. MySQL projects, including MySQL Server, MySQL Workbench, and others are available from the Oracle/MySQL Engineering page. For the repositories related only to MySQL Server, see the MySQL Server page.

To install MySQL from a development source tree, your system must satisfy the tool requirements listed at Section 2.11, “Installing MySQL from Source”, including the requirements for Bazaar and bison. For information about using Bazaar with MySQL, see http://forge.mysql.com/wiki/MySQL_Bazaar_Howto.

To create a local branch of the MySQL development tree on your machine, use this procedure:

  1. To obtain a copy of the MySQL source code, you must create a new Bazaar branch. If you do not already have a Bazaar repository directory set up, you must initialize a new directory:

    shell> mkdir mysql-server
    shell> bzr init-repo --trees mysql-server
    

    This is a one-time operation.

  2. Assuming that you have an initialized repository directory, you can branch from the public MySQL server repositories to create a local source tree. To create a branch of a specific version:

    shell> cd mysql-server
    shell> bzr branch lp:mysql-server/5.5 mysql-5.5
    

    This is a one-time operation per source tree. You can branch the source trees for several versions of MySQL under the mysql-server directory.

  3. The initial download will take some time to complete, depending on the speed of your connection. Please be patient. Once you have downloaded the first tree, additional trees should take significantly less time to download.

  4. When building from the Bazaar branch, you may want to create a copy of your active branch so that you can make configuration and other changes without affecting the original branch contents. You can achieve this by branching from the original branch:

    shell> bzr branch mysql-5.5 mysql-5.5-build
    
  5. To obtain changes made after you have set up the branch initially, update it using the pull option periodically. Use this command in the top-level directory of the local copy:

    shell> bzr pull
    

    To examine the changeset comments for the tree, use the log option to bzr:

    shell> bzr log
    

    You can also browse changesets, comments, and source code online at the Launchpad MySQL Server page.

    If you see diffs (changes) or code that you have a question about, do not hesitate to send email to the MySQL internals mailing list. See Section 1.6.1, “MySQL Mailing Lists”. If you think you have a better idea on how to do something, send an email message to the list with a patch.

After you have the local branch, you can build MySQL server from the source code. For information, see Section 2.11.2, “Installing MySQL from a Standard Source Distribution”, except that you skip the part about obtaining and unpacking the distribution.

Be careful about installing a build from a distribution source tree on a production machine. The installation command may overwrite your live release installation. If you already have MySQL installed and do not want to overwrite it, run CMake with values for the CMAKE_INSTALL_PREFIX, MYSQL_TCP_PORT, and MYSQL_UNIX_ADDR options different from those used by your production server. For additional information about preventing multiple servers from interfering with each other, see Section 5.6, “Running Multiple MySQL Servers on the Same Machine”.

Play hard with your new installation. For example, try to make new features crash. Start by running make test. See Section 23.1.2, “The MySQL Test Suite”.

Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout