Documentation Home
MySQL 5.6 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 30.6Mb
PDF (A4) - 30.7Mb
PDF (RPM) - 30.1Mb
EPUB - 7.7Mb
HTML Download (TGZ) - 7.5Mb
HTML Download (Zip) - 7.5Mb
HTML Download (RPM) - 6.4Mb
Eclipse Doc Plugin (TGZ) - 8.2Mb
Eclipse Doc Plugin (Zip) - 10.1Mb
Man Pages (TGZ) - 200.2Kb
Man Pages (Zip) - 311.7Kb
Info (Gzip) - 2.9Mb
Info (Zip) - 2.9Mb
Excerpts from this Manual

MySQL 5.6 Reference Manual  /  ...  /  Installing MySQL on Linux Using Debian Packages from Oracle

2.5.6 Installing MySQL on Linux Using Debian Packages from Oracle

Oracle provides Debian packages for installing MySQL on Debian or Debian-like Linux systems. The packages are available through two different channels:

  • The MySQL APT Repository, supporting the Debian 7 and 8, and Ubuntu 12, 14, and 15 platforms. For details, see Section 2.5.3, “Installing MySQL on Linux Using the MySQL APT Repository”.

  • The MySQL Developer Zone's Download Area. For details, see Section 2.1.2, “How to Get MySQL”. The following are some information on the Debian packages available there and the instructions for installing them:

    • You may also need to install the libaio library if it is not already present on your system:

      shell> sudo apt-get install libaio1
      
    • For Debian 7 and 8, and Ubuntu 12, 14, and 15:

      • Various Debian packages are provided in the MySQL Developer Zone for installing different components of MySQL. The preferred method is to use the tarball bundle, which contains the packages needed for a basic setup of MySQL. The tarball bundles have names in the format of mysql-server_MVER-DVER_CPU.deb-bundle.tar. MVER is the MySQL version and DVER is the Linux distribution version. The CPU value indicates the processor type or family for which the package is built, as shown in the following table:

        Table 2.9 MySQL Debian 7 and 8, and Ubuntu 12, 14, and 15 Installation Packages CPU Identifiers

        CPU ValueIntended Processor Type or Family
        i386Pentium processor or better, 32 bit
        amd6464-bit x86 processor


      • After downloading the tarball, unpack it with the following command:

        shell> tar -xvf mysql-server_MVER-DVER_CPU.deb-bundle.tar
        

      • In general, install the deb packages unpacked from the tarball with the command (see explanations below for the extra steps required for installing the server package):

        shell> sudo dpkg -i package-name.deb

        There are four packages to install:

        • The database common files (install this package before the other ones):

          shell> sudo dpkg -i mysql-common_MVER-DVER_CPU.deb

        • The MySQL server:

          Install first the package for the database common files (see the last bullet), and then pre-configure your server installation by the following command:

          shell> dpkg-preconfigure mysql-community-server_MVER-DVER_CPU.deb

          There are then two requests for you:

          • Supply a password for the root user for your MySQL installation.

            Important

            Make sure you remember the root password you set. Users who want to set a password later can leave the password field blank in the dialogue box and just press OK. However, it is very important that you set the password soon using the program mysql_secure_installation, as people can gain anonymous access to your MySQL server until you have secured the database's root account with a password.

          • Indicate if you want to install the test database with Yes or No. Installation of the test database is not recommended for production environments.

          Next, install the server package with the following command:

          shell> sudo dpkg -i mysql-community-server_MVER-DVER_CPU.deb

        • The MySQL client:

          shell> sudo dpkg -i mysql-community-client_MVER-DVER_CPU.deb

        • The MySQL shared client library:

          shell> sudo dpkg -i libmysqlclient18_MVER-DVER_CPU.deb

        Here are where the files are installed on the system:

        • All configuration files (like my.cnf) are under /etc

        • All binaries, libraries, headers, etc., are under /usr

        • The data directory is under /var

    • For Debian 6:

      • Debian package files directly downloaded from the MySQL Developer Zone have names in the mysql-MVER-DVER-CPU.deb format. MVER is the MySQL version and DVER is the Debian version. The CPU value indicates the processor type or family for which the package is built, as shown in the following table:

        Table 2.10 MySQL Debian 6 Installation Package CPU Identifiers

        CPU ValueIntended Processor Type or Family
        i686Pentium processor or better, 32 bit
        x86_6464-bit x86 processor


      • After downloading a Debian package, use the following command to install it;

        shell> dpkg -i mysql-MVER-DVER-CPU.deb
        

        The Debian package installs files under the /opt/mysql/server-5.6 directory.

Note

Debian distributions of MySQL are also provided by other vendors. Be aware that they may differ from those built by Oracle in features, capabilities, and conventions (including communication setup), and that the instructions in this manual do not necessarily apply to installing them. The vendor's instructions should be consulted instead.


User Comments
Sign Up Login You must be logged in to post a comment.