MySQL 8.0 Reference Manual 2.5.8 Installing MySQL on Linux with Juju ....................................................................... 196 2.5.9 Managing MySQL Server with systemd ................................................................... 196 2.6 Installing MySQL Using Unbreakable Linux Network (ULN) ................................................. 202 2.7 Installing MySQL on Solaris .............................................................................................. 202 2.7.1 Installing MySQL on Solaris Using a Solaris PKG .................................................... 203 2.8 Installing MySQL on FreeBSD ........................................................................................... 204 2.9 Installing MySQL from Source ........................................................................................... 205 2.9.1 Source Installation Methods .................................................................................... 206 2.9.2 Source Installation Prerequisites ............................................................................. 206 2.9.3 MySQL Layout for Source Installation ..................................................................... 208 2.9.4 Installing MySQL Using a Standard Source Distribution ............................................ 208 2.9.5 Installing MySQL Using a Development Source Tree ............................................... 212 2.9.6 Configuring SSL Library Support ............................................................................. 214 2.9.7 MySQL Source-Configuration Options ..................................................................... 215 2.9.8 Dealing with Problems Compiling MySQL ................................................................ 245 2.9.9 MySQL Configuration and Third-Party Tools ............................................................ 246 2.9.10 Generating MySQL Doxygen Documentation Content ............................................ 247 2.10 Postinstallation Setup and Testing ................................................................................... 248 2.10.1 Initializing the Data Directory ................................................................................ 248 2.10.2 Starting the Server ............................................................................................... 254 2.10.3 Testing the Server ................................................................................................ 256 2.10.4 Securing the Initial MySQL Account ...................................................................... 258 2.10.5 Starting and Stopping MySQL Automatically .......................................................... 260 2.11 Upgrading MySQL .......................................................................................................... 261 2.11.1 Before You Begin ................................................................................................. 262 2.11.2 Upgrade Paths ..................................................................................................... 263 2.11.3 What the MySQL Upgrade Process Upgrades ....................................................... 263 2.11.4 Changes in MySQL 8.0 ........................................................................................ 267 2.11.5 Preparing Your Installation for Upgrade ................................................................. 283 2.11.6 Upgrading MySQL Binary or Package-based Installations on Unix/Linux .................. 286 2.11.7 Upgrading MySQL with the MySQL Yum Repository .............................................. 291 2.11.8 Upgrading MySQL with the MySQL APT Repository .............................................. 293 2.11.9 Upgrading MySQL with the MySQL SLES Repository ............................................ 293 2.11.10 Upgrading MySQL on Windows .......................................................................... 293 2.11.11 Upgrading a Docker Installation of MySQL .......................................................... 295 2.11.12 Upgrade Troubleshooting .................................................................................... 295 2.11.13 Rebuilding or Repairing Tables or Indexes .......................................................... 296 2.11.14 Copying MySQL Databases to Another Machine .................................................. 297 2.12 Downgrading MySQL ...................................................................................................... 298 2.13 Perl Installation Notes ..................................................................................................... 298 2.13.1 Installing Perl on Unix .......................................................................................... 299 2.13.2 Installing ActiveState Perl on Windows .................................................................. 300 2.13.3 Problems Using the Perl DBI/DBD Interface .......................................................... 300 3 Tutorial ........................................................................................................................................ 303 3.1 Connecting to and Disconnecting from the Server .............................................................. 303 3.2 Entering Queries ............................................................................................................... 304 3.3 Creating and Using a Database ........................................................................................ 307 3.3.1 Creating and Selecting a Database ......................................................................... 308 3.3.2 Creating a Table .................................................................................................... 309 3.3.3 Loading Data into a Table ...................................................................................... 311 3.3.4 Retrieving Information from a Table ........................................................................ 312 3.4 Getting Information About Databases and Tables ............................................................... 325 3.5 Using mysql in Batch Mode .............................................................................................. 326 3.6 Examples of Common Queries .......................................................................................... 328 iv