没有合适的资源?快使用搜索试试~ 我知道了~
MySQL 5.7 Reference Manual Including MySQL Cluster NDB 7.5
需积分: 8 1 下载量 117 浏览量
2019-01-05
23:43:58
上传
评论
收藏 33.57MB PDF 举报
温馨提示
This is the MySQL™ Reference Manual. It documents MySQL 5.7 through 5.7.13, as well as MySQL Cluster releases based on version 7.5 of NDB through 5.7.11-ndb-7.5.2, respectively. 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.
资源推荐
资源详情
资源评论
MySQL 5.7 Reference Manual
Including MySQL Cluster NDB 7.5
Abstract
This is the MySQL™ Reference Manual. It documents MySQL 5.7 through 5.7.13, as well as MySQL Cluster releases
based on version 7.5 of NDB through 5.7.11-ndb-7.5.2, respectively.
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, see the Legal Notices.
For help with using MySQL, please visit either the MySQL Forums or MySQL Mailing Lists, where you can discuss
your issues with other MySQL users.
For additional documentation on MySQL products, including translations of the documentation into other languages,
and downloadable versions in variety of formats, including HTML and PDF formats, see the MySQL Documentation
Library.
Licensing information—MySQL 5.7. This product may include third-party software, used under license. If you are
using a Commercial release of MySQL 5.7, see this document for licensing information, including licensing information
relating to third-party software that may be included in this Commercial release. If you are using a Community release
of MySQL 5.7, see this document for licensing information, including licensing information relating to third-party
software that may be included in this Community release.
Licensing information—MySQL Cluster. This product may include third-party software, used under license. If
you are using a Community release of MySQL Cluster NDB 7.5, see this document for licensing information, including
licensing information relating to third-party software that may be included in this Community release.
Document generated on: 2016-03-10 (revision: 46986)
iii
Table of Contents
Preface and Legal Notices .............................................................................................................. xxv
1 General Information ........................................................................................................................ 1
1.1 About This Manual ............................................................................................................... 2
1.2 Typographical and Syntax Conventions ................................................................................. 3
1.3 Overview of the MySQL Database Management System ........................................................ 4
1.3.1 What is MySQL? ....................................................................................................... 4
1.3.2 The Main Features of MySQL .................................................................................... 6
1.3.3 History of MySQL ...................................................................................................... 9
1.4 What Is New in MySQL 5.7 .................................................................................................. 9
1.5 Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 5.7 ....... 21
1.6 MySQL Information Sources ............................................................................................... 30
1.6.1 MySQL Mailing Lists ................................................................................................ 30
1.6.2 MySQL Community Support at the MySQL Forums ................................................... 32
1.6.3 MySQL Community Support on Internet Relay Chat (IRC) .......................................... 33
1.6.4 MySQL Enterprise ................................................................................................... 33
1.7 How to Report Bugs or Problems ....................................................................................... 33
1.8 MySQL Standards Compliance ........................................................................................... 38
1.8.1 MySQL Extensions to Standard SQL ........................................................................ 39
1.8.2 MySQL Differences from Standard SQL ................................................................... 42
1.8.3 How MySQL Deals with Constraints ......................................................................... 44
1.9 Credits ............................................................................................................................... 47
1.9.1 Contributors to MySQL ............................................................................................ 47
1.9.2 Documenters and translators ................................................................................... 52
1.9.3 Packages that support MySQL ................................................................................. 53
1.9.4 Tools that were used to create MySQL ..................................................................... 54
1.9.5 Supporters of MySQL .............................................................................................. 54
2 Installing and Upgrading MySQL ................................................................................................... 57
2.1 General Installation Guidance ............................................................................................. 59
2.1.1 Which MySQL Version and Distribution to Install ....................................................... 59
2.1.2 How to Get MySQL ................................................................................................. 61
2.1.3 Verifying Package Integrity Using MD5 Checksums or GnuPG ................................... 61
2.1.4 Installation Layouts .................................................................................................. 71
2.1.5 Compiler-Specific Build Characteristics ..................................................................... 71
2.2 Installing MySQL on Unix/Linux Using Generic Binaries ....................................................... 71
2.3 Installing MySQL on Microsoft Windows .............................................................................. 74
2.3.1 MySQL Installation Layout on Microsoft Windows ...................................................... 77
2.3.2 Choosing An Installation Package ............................................................................ 77
2.3.3 Installing MySQL on Microsoft Windows Using MySQL Installer .................................. 79
2.3.4 MySQL Notifier ...................................................................................................... 107
2.3.5 Installing MySQL on Microsoft Windows Using a noinstall Zip Archive ....................... 119
2.3.6 Troubleshooting a Microsoft Windows MySQL Server Installation .............................. 128
2.3.7 Windows Postinstallation Procedures ...................................................................... 130
2.3.8 Upgrading MySQL on Windows .............................................................................. 132
2.4 Installing MySQL on OS X ................................................................................................ 133
2.4.1 General Notes on Installing MySQL on OS X .......................................................... 134
2.4.2 Installing MySQL on OS X Using Native Packages .................................................. 135
2.4.3 Installing a MySQL Launch Daemon ....................................................................... 141
2.4.4 Installing and Using the MySQL Preference Pane .................................................... 144
2.5 Installing MySQL on Linux ................................................................................................ 149
2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository .................................. 150
2.5.2 Replacing a Third-Party Distribution of MySQL Using the MySQL Yum Repository ...... 155
MySQL 5.7 Reference Manual
iv
2.5.3 Installing MySQL on Linux Using the MySQL APT Repository .................................. 157
2.5.4 Installing MySQL on Linux Using the MySQL SLES Repository ................................. 158
2.5.5 Installing MySQL on Linux Using RPM Packages from Oracle .................................. 158
2.5.6 Installing MySQL on Linux Using Debian Packages from Oracle ............................... 162
2.5.7 Installing MySQL on Linux from the Native Software Repositories ............................. 164
2.5.8 Installing MySQL on Linux with docker ................................................................... 167
2.5.9 Installing MySQL on Linux with juju ........................................................................ 167
2.5.10 Managing MySQL Server with systemd ................................................................. 167
2.6 Installing MySQL Using Unbreakable Linux Network (ULN) ................................................. 170
2.7 Installing MySQL on Solaris and OpenSolaris .................................................................... 171
2.7.1 Installing MySQL on Solaris Using a Solaris PKG .................................................... 172
2.7.2 Installing MySQL on OpenSolaris Using IPS ........................................................... 173
2.8 Installing MySQL on FreeBSD .......................................................................................... 174
2.9 Installing MySQL from Source ........................................................................................... 174
2.9.1 MySQL Layout for Source Installation ..................................................................... 176
2.9.2 Installing MySQL Using a Standard Source Distribution ............................................ 177
2.9.3 Installing MySQL Using a Development Source Tree ............................................... 181
2.9.4 MySQL Source-Configuration Options ..................................................................... 183
2.9.5 Dealing with Problems Compiling MySQL ............................................................... 203
2.9.6 MySQL Configuration and Third-Party Tools ............................................................ 204
2.10 Postinstallation Setup and Testing ................................................................................... 204
2.10.1 Initializing the Data Directory ................................................................................ 205
2.10.2 Starting the Server .............................................................................................. 213
2.10.3 Testing the Server ............................................................................................... 216
2.10.4 Securing the Initial MySQL Accounts .................................................................... 218
2.10.5 Starting and Stopping MySQL Automatically .......................................................... 223
2.11 Upgrading or Downgrading MySQL ................................................................................. 224
2.11.1 Upgrading MySQL ............................................................................................... 224
2.11.2 Downgrading MySQL ........................................................................................... 239
2.11.3 Checking Whether Tables or Indexes Must Be Rebuilt ........................................... 246
2.11.4 Rebuilding or Repairing Tables or Indexes ............................................................ 247
2.11.5 Copying MySQL Databases to Another Machine .................................................... 248
2.12 Environment Variables .................................................................................................... 249
2.13 Perl Installation Notes ..................................................................................................... 251
2.13.1 Installing Perl on Unix .......................................................................................... 251
2.13.2 Installing ActiveState Perl on Windows ................................................................. 252
2.13.3 Problems Using the Perl DBI/DBD Interface .......................................................... 253
3 Tutorial ....................................................................................................................................... 255
3.1 Connecting to and Disconnecting from the Server .............................................................. 255
3.2 Entering Queries .............................................................................................................. 256
3.3 Creating and Using a Database ........................................................................................ 259
3.3.1 Creating and Selecting a Database ........................................................................ 261
3.3.2 Creating a Table ................................................................................................... 261
3.3.3 Loading Data into a Table ...................................................................................... 263
3.3.4 Retrieving Information from a Table ........................................................................ 264
3.4 Getting Information About Databases and Tables ............................................................... 278
3.5 Using mysql in Batch Mode .............................................................................................. 279
3.6 Examples of Common Queries ......................................................................................... 280
3.6.1 The Maximum Value for a Column ......................................................................... 281
3.6.2 The Row Holding the Maximum of a Certain Column ............................................... 281
3.6.3 Maximum of Column per Group ............................................................................. 282
3.6.4 The Rows Holding the Group-wise Maximum of a Certain Column ............................ 282
3.6.5 Using User-Defined Variables ................................................................................ 283
3.6.6 Using Foreign Keys ............................................................................................... 283
MySQL 5.7 Reference Manual
v
3.6.7 Searching on Two Keys ......................................................................................... 285
3.6.8 Calculating Visits Per Day ...................................................................................... 285
3.6.9 Using AUTO_INCREMENT .................................................................................... 286
3.7 Using MySQL with Apache ............................................................................................... 288
4 MySQL Programs ....................................................................................................................... 289
4.1 Overview of MySQL Programs .......................................................................................... 290
4.2 Using MySQL Programs ................................................................................................... 294
4.2.1 Invoking MySQL Programs .................................................................................... 294
4.2.2 Connecting to the MySQL Server ........................................................................... 295
4.2.3 Specifying Program Options ................................................................................... 298
4.2.4 Using Options on the Command Line ..................................................................... 299
4.2.5 Program Option Modifiers ...................................................................................... 301
4.2.6 Using Option Files ................................................................................................. 302
4.2.7 Command-Line Options that Affect Option-File Handling .......................................... 306
4.2.8 Using Options to Set Program Variables ................................................................. 308
4.2.9 Option Defaults, Options Expecting Values, and the = Sign ...................................... 309
4.2.10 Setting Environment Variables .............................................................................. 312
4.3 MySQL Server and Server-Startup Programs ..................................................................... 313
4.3.1 mysqld — The MySQL Server .............................................................................. 313
4.3.2 mysqld_safe — MySQL Server Startup Script ...................................................... 314
4.3.3 mysql.server — MySQL Server Startup Script .................................................... 319
4.3.4 mysqld_multi — Manage Multiple MySQL Servers .............................................. 322
4.4 MySQL Installation-Related Programs ............................................................................... 326
4.4.1 comp_err — Compile MySQL Error Message File .................................................. 326
4.4.2 mysql_install_db — Initialize MySQL Data Directory ......................................... 327
4.4.3 mysql_plugin — Configure MySQL Server Plugins .............................................. 338
4.4.4 mysql_secure_installation — Improve MySQL Installation Security ................ 340
4.4.5 mysql_ssl_rsa_setup — Create SSL/RSA Files ................................................ 343
4.4.6 mysql_tzinfo_to_sql — Load the Time Zone Tables ......................................... 346
4.4.7 mysql_upgrade — Check and Upgrade MySQL Tables ......................................... 346
4.5 MySQL Client Programs ................................................................................................... 354
4.5.1 mysql — The MySQL Command-Line Tool ............................................................ 354
4.5.2 mysqladmin — Client for Administering a MySQL Server ....................................... 380
4.5.3 mysqlcheck — A Table Maintenance Program ...................................................... 389
4.5.4 mysqldump — A Database Backup Program .......................................................... 397
4.5.5 mysqlimport — A Data Import Program ............................................................... 419
4.5.6 mysqlpump — A Database Backup Program .......................................................... 426
4.5.7 mysqlshow — Display Database, Table, and Column Information ............................ 441
4.5.8 mysqlslap — Load Emulation Client .................................................................... 447
4.6 MySQL Administrative and Utility Programs ....................................................................... 455
4.6.1 innochecksum — Offline InnoDB File Checksum Utility .......................................... 455
4.6.2 myisam_ftdump — Display Full-Text Index information .......................................... 461
4.6.3 myisamchk — MyISAM Table-Maintenance Utility .................................................. 462
4.6.4 myisamlog — Display MyISAM Log File Contents .................................................. 479
4.6.5 myisampack — Generate Compressed, Read-Only MyISAM Tables ........................ 480
4.6.6 mysql_config_editor — MySQL Configuration Utility ......................................... 486
4.6.7 mysqlbinlog — Utility for Processing Binary Log Files .......................................... 493
4.6.8 mysqldumpslow — Summarize Slow Query Log Files ............................................ 515
4.7 MySQL Program Development Utilities .............................................................................. 517
4.7.1 mysql_config — Display Options for Compiling Clients ........................................ 517
4.7.2 my_print_defaults — Display Options from Option Files .................................... 519
4.7.3 resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols ............. 520
4.8 Miscellaneous Programs ................................................................................................... 521
4.8.1 lz4_decompress — Decompress mysqlpump LZ4-Compressed Output .................. 521
剩余4635页未读,继续阅读
资源评论
liquid2041
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功