Mysql Installation Guide Abstract
Total Page:16
File Type:pdf, Size:1020Kb
MySQL Installation Guide Abstract This is the MySQL Installation Guide from the MySQL 5.7 Reference Manual. For legal information, see the Legal Notices. For help with using MySQL, please visit the MySQL Forums, where you can discuss your issues with other MySQL users. Document generated on: 2021-10-06 (revision: 70984) Table of Contents Preface and Legal Notices ............................................................................................................ v 1 Installing and Upgrading MySQL ................................................................................................ 1 2 General Installation Guidance .................................................................................................... 3 2.1 Supported Platforms ....................................................................................................... 3 2.2 Which MySQL Version and Distribution to Install .............................................................. 3 2.3 How to Get MySQL ........................................................................................................ 4 2.4 Verifying Package Integrity Using MD5 Checksums or GnuPG .......................................... 5 2.4.1 Verifying the MD5 Checksum ............................................................................... 5 2.4.2 Signature Checking Using GnuPG ........................................................................ 5 2.4.3 Signature Checking Using Gpg4win for Windows ................................................. 13 2.4.4 Signature Checking Using RPM .......................................................................... 17 2.5 Installation Layouts ....................................................................................................... 17 2.6 Compiler-Specific Build Characteristics .......................................................................... 17 3 Installing MySQL on Unix/Linux Using Generic Binaries ............................................................. 19 4 Installing MySQL from Source .................................................................................................. 23 4.1 Source Installation Methods ........................................................................................... 23 4.2 Source Installation Prerequisites .................................................................................... 23 4.3 MySQL Layout for Source Installation ............................................................................ 25 4.4 Installing MySQL Using a Standard Source Distribution ................................................... 25 4.5 Installing MySQL Using a Development Source Tree ...................................................... 29 4.6 Configuring SSL Library Support .................................................................................... 31 4.7 MySQL Source-Configuration Options ............................................................................ 32 4.8 Dealing with Problems Compiling MySQL ....................................................................... 54 4.9 MySQL Configuration and Third-Party Tools ................................................................... 55 5 Installing MySQL on Microsoft Windows ................................................................................... 57 5.1 MySQL Installation Layout on Microsoft Windows ........................................................... 60 5.2 Choosing an Installation Package .................................................................................. 60 5.3 MySQL Installer for Windows ........................................................................................ 61 5.3.1 MySQL Installer Initial Setup ............................................................................... 63 5.3.2 Setting Alternative Server Paths with MySQL Installer .......................................... 67 5.3.3 Installation Workflows with MySQL Installer ......................................................... 68 5.3.4 MySQL Installer Product Catalog and Dashboard ................................................. 75 5.3.5 MySQLInstallerConsole Reference ............................................................... 81 5.4 Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive ........................ 85 5.4.1 Extracting the Install Archive ............................................................................... 85 5.4.2 Creating an Option File ...................................................................................... 85 5.4.3 Selecting a MySQL Server Type ......................................................................... 87 5.4.4 Initializing the Data Directory .............................................................................. 87 5.4.5 Starting the Server for the First Time .................................................................. 87 5.4.6 Starting MySQL from the Windows Command Line .............................................. 88 5.4.7 Customizing the PATH for MySQL Tools ............................................................. 89 5.4.8 Starting MySQL as a Windows Service ............................................................... 90 5.4.9 Testing The MySQL Installation .......................................................................... 93 5.5 Troubleshooting a Microsoft Windows MySQL Server Installation ..................................... 93 5.6 Windows Postinstallation Procedures ............................................................................. 95 5.7 Windows Platform Restrictions ....................................................................................... 96 6 Installing MySQL on macOS .................................................................................................... 99 6.1 General Notes on Installing MySQL on macOS .............................................................. 99 6.2 Installing MySQL on macOS Using Native Packages .................................................... 100 6.3 Installing a MySQL Launch Daemon ............................................................................ 105 6.4 Installing and Using the MySQL Preference Pane ......................................................... 108 7 Installing MySQL on Linux ...................................................................................................... 113 7.1 Installing MySQL on Linux Using the MySQL Yum Repository ....................................... 114 7.2 Replacing a Third-Party Distribution of MySQL Using the MySQL Yum Repository .......... 117 7.3 Installing MySQL on Linux Using the MySQL APT Repository ........................................ 120 iii MySQL Installation Guide 7.4 Installing MySQL on Linux Using the MySQL SLES Repository ...................................... 120 7.5 Installing MySQL on Linux Using RPM Packages from Oracle ....................................... 120 7.6 Installing MySQL on Linux Using Debian Packages from Oracle .................................... 125 7.7 Deploying MySQL on Linux with Docker ....................................................................... 126 7.7.1 Basic Steps for MySQL Server Deployment with Docker ..................................... 126 7.7.2 More Topics on Deploying MySQL Server with Docker ....................................... 131 7.7.3 Deploying MySQL on Windows and Other Non-Linux Platforms with Docker ......... 135 7.8 Installing MySQL on Linux from the Native Software Repositories .................................. 136 7.9 Installing MySQL on Linux with Juju ............................................................................. 139 7.10 Managing MySQL Server with systemd ...................................................................... 139 8 Installing MySQL on Solaris ................................................................................................... 145 8.1 Installing MySQL on Solaris Using a Solaris PKG ......................................................... 146 9 Postinstallation Setup and Testing .......................................................................................... 149 9.1 Initializing the Data Directory ....................................................................................... 149 9.2 Starting the Server ...................................................................................................... 154 9.2.1 Troubleshooting Problems Starting the MySQL Server ........................................ 155 9.3 Testing the Server ....................................................................................................... 157 9.4 Securing the Initial MySQL Account ............................................................................. 159 9.5 Starting and Stopping MySQL Automatically ................................................................. 161 10 Upgrading MySQL ................................................................................................................ 163 10.1 Before You Begin ...................................................................................................... 163 10.2 Upgrade Paths .......................................................................................................... 164 10.3 Changes in MySQL 5.7 ............................................................................................. 164 10.4 Upgrading MySQL Binary or Package-based Installations on Unix/Linux ......................