MySQL 5.7 Reference Manual
iv
2.5.4 Installing MySQL on Linux Using the MySQL SLES Repository ........................... 144
2.5.5 Installing MySQL on Linux Using RPM Packages from Oracle ............................. 144
2.5.6 Installing MySQL on Linux Using Debian Packages from Oracle .......................... 149
2.5.7 Deploying MySQL on Linux with Docker ............................................................ 150
2.5.8 Installing MySQL on Linux from the Native Software Repositories ........................ 157
2.5.9 Installing MySQL on Linux with Juju .................................................................. 160
2.5.10 Managing MySQL Server with systemd ........................................................... 160
2.6 Installing MySQL Using Unbreakable Linux Network (ULN) ........................................... 165
2.7 Installing MySQL on Solaris ......................................................................................... 166
2.7.1 Installing MySQL on Solaris Using a Solaris PKG .............................................. 167
2.8 Installing MySQL on FreeBSD ..................................................................................... 168
2.9 Installing MySQL from Source ..................................................................................... 168
2.9.1 MySQL Layout for Source Installation ................................................................ 170
2.9.2 Installing MySQL Using a Standard Source Distribution ...................................... 170
2.9.3 Installing MySQL Using a Development Source Tree .......................................... 175
2.9.4 MySQL Source-Configuration Options ............................................................... 176
2.9.5 Dealing with Problems Compiling MySQL .......................................................... 197
2.9.6 MySQL Configuration and Third-Party Tools ...................................................... 199
2.10 Postinstallation Setup and Testing ............................................................................. 199
2.10.1 Initializing the Data Directory ........................................................................... 200
2.10.2 Starting the Server ......................................................................................... 208
2.10.3 Testing the Server .......................................................................................... 211
2.10.4 Securing the Initial MySQL Accounts ............................................................... 213
2.10.5 Starting and Stopping MySQL Automatically .................................................... 217
2.11 Upgrading or Downgrading MySQL ............................................................................ 218
2.11.1 Upgrading MySQL .......................................................................................... 218
2.11.2 Downgrading MySQL ...................................................................................... 233
2.11.3 Rebuilding or Repairing Tables or Indexes ....................................................... 241
2.11.4 Copying MySQL Databases to Another Machine .............................................. 242
2.12 Perl Installation Notes ................................................................................................ 243
2.12.1 Installing Perl on Unix ..................................................................................... 243
2.12.2 Installing ActiveState Perl on Windows ............................................................ 244
2.12.3 Problems Using the Perl DBI/DBD Interface ..................................................... 245
3 Tutorial .................................................................................................................................. 247
3.1 Connecting to and Disconnecting from the Server ......................................................... 247
3.2 Entering Queries ......................................................................................................... 248
3.3 Creating and Using a Database ................................................................................... 251
3.3.1 Creating and Selecting a Database ................................................................... 252
3.3.2 Creating a Table .............................................................................................. 253
3.3.3 Loading Data into a Table ................................................................................ 254
3.3.4 Retrieving Information from a Table ................................................................... 255
3.4 Getting Information About Databases and Tables ......................................................... 268
3.5 Using mysql in Batch Mode ......................................................................................... 269
3.6 Examples of Common Queries .................................................................................... 271
3.6.1 The Maximum Value for a Column .................................................................... 271
3.6.2 The Row Holding the Maximum of a Certain Column .......................................... 271
3.6.3 Maximum of Column per Group ........................................................................ 272
3.6.4 The Rows Holding the Group-wise Maximum of a Certain Column ....................... 272
3.6.5 Using User-Defined Variables ........................................................................... 273
3.6.6 Using Foreign Keys .......................................................................................... 273
3.6.7 Searching on Two Keys .................................................................................... 275
3.6.8 Calculating Visits Per Day ................................................................................. 275
3.6.9 Using AUTO_INCREMENT ............................................................................... 276
3.7 Using MySQL with Apache .......................................................................................... 278
4 MySQL Programs .................................................................................................................. 279
4.1 Overview of MySQL Programs ..................................................................................... 280
4.2 Using MySQL Programs .............................................................................................. 284
4.2.1 Invoking MySQL Programs ............................................................................... 284
评论0
最新资源