没有合适的资源?快使用搜索试试~ 我知道了~
mysql5.7官方文档
需积分: 40 74 浏览量
2022-03-31
11:10:32
上传
评论
收藏 36.36MB PDF 举报
温馨提示
mysql5.7官方文档、mysql5.7用户手册、英文版
资源详情
资源评论
资源推荐

MySQL 5.7 Reference Manual
Including MySQL NDB Cluster 7.5 and NDB Cluster 7.6

Abstract
This is the MySQL Reference Manual. It documents MySQL 5.7 through 5.7.39, as well as NDB Cluster releases
based on version 7.5 of NDB through 5.7.37-ndb-7.5.26, respectively. It may include documentation of features of
MySQL versions that have not yet been released. For information about which versions have been released, see the
MySQL 5.7 Release Notes.
MySQL 5.7 features. This manual describes features that are not included in every edition of MySQL 5.7; such
features may not be included in the edition of MySQL 5.7 licensed to you. If you have any questions about the
features included in your edition of MySQL 5.7, refer to your MySQL 5.7 license agreement or contact your Oracle
sales representative.
For notes detailing the changes in each release, see the MySQL 5.7 Release Notes.
For legal information, including licensing information, see the Preface and 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: 2022-03-01 (revision: 72106)

Table of Contents
Preface and Legal Notices ............................................................................................................. xxvii
1 General Information ......................................................................................................................... 1
1.1 About This Manual ............................................................................................................... 2
1.2 Overview of the MySQL Database Management System ........................................................ 4
1.2.1 What is MySQL? ....................................................................................................... 4
1.2.2 The Main Features of MySQL .................................................................................... 5
1.2.3 History of MySQL ...................................................................................................... 8
1.3 What Is New in MySQL 5.7 .................................................................................................. 9
1.4 Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 5.7 ....... 25
1.5 MySQL Information Sources ............................................................................................... 41
1.6 How to Report Bugs or Problems ........................................................................................ 42
1.7 MySQL Standards Compliance ............................................................................................ 47
1.7.1 MySQL Extensions to Standard SQL ........................................................................ 48
1.7.2 MySQL Differences from Standard SQL .................................................................... 51
1.7.3 How MySQL Deals with Constraints ......................................................................... 54
1.8 Credits ............................................................................................................................... 58
1.8.1 Contributors to MySQL ............................................................................................. 58
1.8.2 Documenters and translators .................................................................................... 62
1.8.3 Packages that support MySQL ................................................................................. 64
1.8.4 Tools that were used to create MySQL ..................................................................... 64
1.8.5 Supporters of MySQL .............................................................................................. 65
2 Installing and Upgrading MySQL .................................................................................................... 67
2.1 General Installation Guidance ............................................................................................. 70
2.1.1 Supported Platforms ................................................................................................ 70
2.1.2 Which MySQL Version and Distribution to Install ....................................................... 70
2.1.3 How to Get MySQL ................................................................................................. 71
2.1.4 Verifying Package Integrity Using MD5 Checksums or GnuPG ................................... 72
2.1.5 Installation Layouts .................................................................................................. 88
2.1.6 Compiler-Specific Build Characteristics ..................................................................... 89
2.2 Installing MySQL on Unix/Linux Using Generic Binaries ........................................................ 89
2.3 Installing MySQL on Microsoft Windows .............................................................................. 92
2.3.1 MySQL Installation Layout on Microsoft Windows ...................................................... 95
2.3.2 Choosing an Installation Package ............................................................................. 96
2.3.3 MySQL Installer for Windows ................................................................................... 97
2.3.4 Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive ................. 122
2.3.5 Troubleshooting a Microsoft Windows MySQL Server Installation .............................. 130
2.3.6 Windows Postinstallation Procedures ...................................................................... 132
2.3.7 Windows Platform Restrictions ................................................................................ 134
2.4 Installing MySQL on macOS ............................................................................................. 135
2.4.1 General Notes on Installing MySQL on macOS ....................................................... 136
2.4.2 Installing MySQL on macOS Using Native Packages ............................................... 137
2.4.3 Installing a MySQL Launch Daemon ....................................................................... 143
2.4.4 Installing and Using the MySQL Preference Pane .................................................... 146
2.5 Installing MySQL on Linux ................................................................................................ 151
2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository .................................. 152
2.5.2 Replacing a Third-Party Distribution of MySQL Using the MySQL Yum Repository ..... 156
2.5.3 Installing MySQL on Linux Using the MySQL APT Repository ................................... 159
2.5.4 Installing MySQL on Linux Using the MySQL SLES Repository ................................. 159
2.5.5 Installing MySQL on Linux Using RPM Packages from Oracle .................................. 159
2.5.6 Installing MySQL on Linux Using Debian Packages from Oracle ............................... 164
2.5.7 Deploying MySQL on Linux with Docker .................................................................. 165
iii

MySQL 5.7 Reference Manual
2.5.8 Installing MySQL on Linux from the Native Software Repositories ............................. 175
2.5.9 Installing MySQL on Linux with Juju ....................................................................... 179
2.5.10 Managing MySQL Server with systemd ................................................................. 179
2.6 Installing MySQL Using Unbreakable Linux Network (ULN) ................................................. 184
2.7 Installing MySQL on Solaris .............................................................................................. 185
2.7.1 Installing MySQL on Solaris Using a Solaris PKG .................................................... 186
2.8 Installing MySQL on FreeBSD ........................................................................................... 187
2.9 Installing MySQL from Source ........................................................................................... 188
2.9.1 Source Installation Methods .................................................................................... 188
2.9.2 Source Installation Prerequisites ............................................................................. 188
2.9.3 MySQL Layout for Source Installation ..................................................................... 190
2.9.4 Installing MySQL Using a Standard Source Distribution ............................................ 190
2.9.5 Installing MySQL Using a Development Source Tree ............................................... 194
2.9.6 Configuring SSL Library Support ............................................................................. 196
2.9.7 MySQL Source-Configuration Options ..................................................................... 197
2.9.8 Dealing with Problems Compiling MySQL ................................................................ 221
2.9.9 MySQL Configuration and Third-Party Tools ............................................................ 222
2.10 Postinstallation Setup and Testing ................................................................................... 223
2.10.1 Initializing the Data Directory ................................................................................ 223
2.10.2 Starting the Server ............................................................................................... 229
2.10.3 Testing the Server ................................................................................................ 231
2.10.4 Securing the Initial MySQL Account ...................................................................... 233
2.10.5 Starting and Stopping MySQL Automatically .......................................................... 235
2.11 Upgrading MySQL .......................................................................................................... 236
2.11.1 Before You Begin ................................................................................................. 236
2.11.2 Upgrade Paths ..................................................................................................... 237
2.11.3 Changes in MySQL 5.7 ........................................................................................ 238
2.11.4 Upgrading MySQL Binary or Package-based Installations on Unix/Linux .................. 247
2.11.5 Upgrading MySQL with the MySQL Yum Repository .............................................. 250
2.11.6 Upgrading MySQL with the MySQL APT Repository .............................................. 252
2.11.7 Upgrading MySQL with the MySQL SLES Repository ............................................ 252
2.11.8 Upgrading MySQL on Windows ............................................................................ 252
2.11.9 Upgrading a Docker Installation of MySQL ............................................................ 254
2.11.10 Upgrading MySQL with Directly-Downloaded RPM Packages ............................... 254
2.11.11 Upgrade Troubleshooting .................................................................................... 255
2.11.12 Rebuilding or Repairing Tables or Indexes .......................................................... 256
2.11.13 Copying MySQL Databases to Another Machine .................................................. 257
2.12 Downgrading MySQL ...................................................................................................... 258
2.12.1 Before You Begin ................................................................................................. 259
2.12.2 Downgrade Paths ................................................................................................. 259
2.12.3 Downgrade Notes ................................................................................................ 259
2.12.4 Downgrading Binary and Package-based Installations on Unix/Linux ....................... 262
2.12.5 Downgrade Troubleshooting ................................................................................. 265
2.13 Perl Installation Notes ..................................................................................................... 265
2.13.1 Installing Perl on Unix .......................................................................................... 265
2.13.2 Installing ActiveState Perl on Windows .................................................................. 266
2.13.3 Problems Using the Perl DBI/DBD Interface .......................................................... 267
3 Tutorial ........................................................................................................................................ 269
3.1 Connecting to and Disconnecting from the Server .............................................................. 269
3.2 Entering Queries ............................................................................................................... 270
3.3 Creating and Using a Database ........................................................................................ 273
3.3.1 Creating and Selecting a Database ......................................................................... 274
3.3.2 Creating a Table .................................................................................................... 275
3.3.3 Loading Data into a Table ...................................................................................... 277
iv

MySQL 5.7 Reference Manual
3.3.4 Retrieving Information from a Table ........................................................................ 278
3.4 Getting Information About Databases and Tables ............................................................... 291
3.5 Using mysql in Batch Mode .............................................................................................. 292
3.6 Examples of Common Queries .......................................................................................... 294
3.6.1 The Maximum Value for a Column ......................................................................... 294
3.6.2 The Row Holding the Maximum of a Certain Column ............................................... 294
3.6.3 Maximum of Column per Group .............................................................................. 295
3.6.4 The Rows Holding the Group-wise Maximum of a Certain Column ............................ 295
3.6.5 Using User-Defined Variables ................................................................................. 296
3.6.6 Using Foreign Keys ................................................................................................ 296
3.6.7 Searching on Two Keys ......................................................................................... 299
3.6.8 Calculating Visits Per Day ...................................................................................... 299
3.6.9 Using AUTO_INCREMENT ..................................................................................... 299
3.7 Using MySQL with Apache ............................................................................................... 302
4 MySQL Programs ........................................................................................................................ 303
4.1 Overview of MySQL Programs .......................................................................................... 304
4.2 Using MySQL Programs ................................................................................................... 308
4.2.1 Invoking MySQL Programs ..................................................................................... 308
4.2.2 Specifying Program Options ................................................................................... 309
4.2.3 Command Options for Connecting to the Server ...................................................... 322
4.2.4 Connecting to the MySQL Server Using Command Options ...................................... 332
4.2.5 Connection Transport Protocols .............................................................................. 334
4.2.6 Connection Compression Control ............................................................................ 336
4.2.7 Setting Environment Variables ................................................................................ 336
4.3 Server and Server-Startup Programs ................................................................................. 337
4.3.1 mysqld — The MySQL Server ................................................................................ 337
4.3.2 mysqld_safe — MySQL Server Startup Script .......................................................... 338
4.3.3 mysql.server — MySQL Server Startup Script ......................................................... 345
4.3.4 mysqld_multi — Manage Multiple MySQL Servers ................................................... 347
4.4 Installation-Related Programs ............................................................................................ 351
4.4.1 comp_err — Compile MySQL Error Message File .................................................... 351
4.4.2 mysql_install_db — Initialize MySQL Data Directory ................................................ 352
4.4.3 mysql_plugin — Configure MySQL Server Plugins ................................................... 359
4.4.4 mysql_secure_installation — Improve MySQL Installation Security ............................ 361
4.4.5 mysql_ssl_rsa_setup — Create SSL/RSA Files ....................................................... 365
4.4.6 mysql_tzinfo_to_sql — Load the Time Zone Tables ................................................. 367
4.4.7 mysql_upgrade — Check and Upgrade MySQL Tables ............................................ 368
4.5 Client Programs ................................................................................................................ 376
4.5.1 mysql — The MySQL Command-Line Client ............................................................ 376
4.5.2 mysqladmin — A MySQL Server Administration Program ......................................... 408
4.5.3 mysqlcheck — A Table Maintenance Program ......................................................... 419
4.5.4 mysqldump — A Database Backup Program ........................................................... 431
4.5.5 mysqlimport — A Data Import Program ................................................................... 457
4.5.6 mysqlpump — A Database Backup Program ........................................................... 467
4.5.7 mysqlshow — Display Database, Table, and Column Information ............................. 484
4.5.8 mysqlslap — A Load Emulation Client .................................................................... 492
4.6 Administrative and Utility Programs ................................................................................... 504
4.6.1 innochecksum — Offline InnoDB File Checksum Utility ............................................ 504
4.6.2 myisam_ftdump — Display Full-Text Index information ............................................. 509
4.6.3 myisamchk — MyISAM Table-Maintenance Utility .................................................... 510
4.6.4 myisamlog — Display MyISAM Log File Contents .................................................... 527
4.6.5 myisampack — Generate Compressed, Read-Only MyISAM Tables ......................... 528
4.6.6 mysql_config_editor — MySQL Configuration Utility ................................................. 535
4.6.7 mysqlbinlog — Utility for Processing Binary Log Files .............................................. 541
v
剩余5293页未读,继续阅读







残鸢
- 粉丝: 1
- 资源: 7
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


安全验证
文档复制为VIP权益,开通VIP直接复制

评论0