没有合适的资源?快使用搜索试试~ 我知道了~
MySQL 8.0手册
1星 需积分: 10 48 下载量 66 浏览量
2019-03-25
17:05:56
上传
评论 4
收藏 60.14MB PDF 举报
温馨提示
试读
5450页
MySQL 数据库由于其快速性能,高可靠性和易用性而成为世界上最流行的开源数据库。 它被广泛应用在各个行业。从个人到世界级的公司及行业领导者都广泛使用 MySQL 数据库。 例如 Yaho, Alcatel-Lucent, Gogle, Nokia, YouTbe 等。 像大多数产品一样,MySQL 安装极其简单。
资源推荐
资源详情
资源评论
MySQL 8.0 Reference Manual
Abstract
This is the MySQL™ Reference Manual. It documents MySQL 8.0 through 8.0.14. 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 8.0 Release Notes.
MySQL Cluster is currently not supported in MySQL 8.0. For information about MySQL Cluster, please see MySQL
NDB Cluster 7.5 and NDB Cluster 7.6.
MySQL 8.0 features. This manual describes features that are not included in every edition of MySQL 8.0; such
features may not be included in the edition of MySQL 8.0 licensed to you. If you have any questions about the
features included in your edition of MySQL 8.0, refer to your MySQL 8.0 license agreement or contact your Oracle
sales representative.
For notes detailing the changes in each release, see the MySQL 8.0 Release Notes.
For legal information, including licensing information, see the Preface and 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.
Document generated on: 2018-08-25 (revision: 58790)
iii
Table of Contents
Preface and Legal Notices ............................................................................................................. xxvii
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 8.0 .................................................................................................. 9
1.5 Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 8.0 ....... 27
1.6 MySQL Information Sources ............................................................................................... 37
1.6.1 MySQL Websites ..................................................................................................... 37
1.6.2 MySQL Mailing Lists ................................................................................................ 37
1.6.3 MySQL Community Support at the MySQL Forums ................................................... 39
1.6.4 MySQL Community Support on Internet Relay Chat (IRC) .......................................... 40
1.6.5 MySQL Enterprise .................................................................................................... 40
1.7 How to Report Bugs or Problems ........................................................................................ 40
1.8 MySQL Standards Compliance ............................................................................................ 45
1.8.1 MySQL Extensions to Standard SQL ........................................................................ 46
1.8.2 MySQL Differences from Standard SQL .................................................................... 49
1.8.3 How MySQL Deals with Constraints ......................................................................... 51
1.9 Credits ............................................................................................................................... 54
1.9.1 Contributors to MySQL ............................................................................................. 54
1.9.2 Documenters and translators .................................................................................... 58
1.9.3 Packages that support MySQL ................................................................................. 60
1.9.4 Tools that were used to create MySQL ..................................................................... 61
1.9.5 Supporters of MySQL .............................................................................................. 61
2 Installing and Upgrading MySQL .................................................................................................... 63
2.1 General Installation Guidance ............................................................................................. 65
2.1.1 Which MySQL Version and Distribution to Install ....................................................... 65
2.1.2 How to Get MySQL ................................................................................................. 67
2.1.3 Verifying Package Integrity Using MD5 Checksums or GnuPG ................................... 67
2.1.4 Installation Layouts .................................................................................................. 80
2.1.5 Compiler-Specific Build Characteristics ..................................................................... 80
2.2 Installing MySQL on Unix/Linux Using Generic Binaries ........................................................ 81
2.3 Installing MySQL on Microsoft Windows .............................................................................. 84
2.3.1 MySQL Installation Layout on Microsoft Windows ...................................................... 86
2.3.2 Choosing an Installation Package ............................................................................. 87
2.3.3 MySQL Installer for Windows ................................................................................... 88
2.3.4 MySQL Notifier ...................................................................................................... 110
2.3.5 Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive ................. 122
2.3.6 Troubleshooting a Microsoft Windows MySQL Server Installation .............................. 130
2.3.7 Windows Postinstallation Procedures ...................................................................... 132
2.3.8 Upgrading MySQL on Windows .............................................................................. 134
2.4 Installing MySQL on macOS ............................................................................................. 136
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 and Using the MySQL Launch Daemon .................................................... 141
2.4.4 Installing and Using the MySQL Preference Pane .................................................... 144
2.5 Installing MySQL on Linux ................................................................................................ 148
2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository .................................. 149
MySQL 8.0 Reference Manual
iv
2.5.2 Installing MySQL on Linux Using the MySQL APT Repository ................................... 153
2.5.3 Installing MySQL on Linux Using the MySQL SLES Repository ................................. 154
2.5.4 Installing MySQL on Linux Using RPM Packages from Oracle .................................. 154
2.5.5 Installing MySQL on Linux Using Debian Packages from Oracle ............................... 159
2.5.6 Deploying MySQL on Linux with Docker .................................................................. 161
2.5.7 Installing MySQL on Linux from the Native Software Repositories ............................. 170
2.5.8 Installing MySQL on Linux with Juju ....................................................................... 174
2.5.9 Managing MySQL Server with systemd ................................................................... 174
2.6 Installing MySQL Using Unbreakable Linux Network (ULN) ................................................. 179
2.7 Installing MySQL on FreeBSD ........................................................................................... 180
2.8 Installing MySQL from Source ........................................................................................... 181
2.8.1 MySQL Layout for Source Installation ..................................................................... 183
2.8.2 Installing MySQL Using a Standard Source Distribution ............................................ 183
2.8.3 Installing MySQL Using a Development Source Tree ............................................... 188
2.8.4 MySQL Source-Configuration Options ..................................................................... 190
2.8.5 Dealing with Problems Compiling MySQL ................................................................ 212
2.8.6 MySQL Configuration and Third-Party Tools ............................................................ 213
2.8.7 Generating MySQL Doxygen Documentation Content .............................................. 214
2.9 Postinstallation Setup and Testing ..................................................................................... 215
2.9.1 Initializing the Data Directory .................................................................................. 215
2.9.2 Starting the Server ................................................................................................. 221
2.9.3 Testing the Server ................................................................................................. 224
2.9.4 Securing the Initial MySQL Account ........................................................................ 226
2.9.5 Starting and Stopping MySQL Automatically ............................................................ 228
2.10 Upgrading or Downgrading MySQL .................................................................................. 229
2.10.1 Upgrading MySQL ................................................................................................ 229
2.10.2 Downgrading MySQL ........................................................................................... 246
2.10.3 Rebuilding or Repairing Tables or Indexes ............................................................ 246
2.10.4 Copying MySQL Databases to Another Machine .................................................... 248
2.11 Perl Installation Notes ..................................................................................................... 249
2.11.1 Installing Perl on Unix .......................................................................................... 249
2.11.2 Installing ActiveState Perl on Windows .................................................................. 250
2.11.3 Problems Using the Perl DBI/DBD Interface .......................................................... 250
3 Tutorial ........................................................................................................................................ 253
3.1 Connecting to and Disconnecting from the Server .............................................................. 253
3.2 Entering Queries ............................................................................................................... 254
3.3 Creating and Using a Database ........................................................................................ 257
3.3.1 Creating and Selecting a Database ......................................................................... 259
3.3.2 Creating a Table .................................................................................................... 259
3.3.3 Loading Data into a Table ...................................................................................... 261
3.3.4 Retrieving Information from a Table ........................................................................ 262
3.4 Getting Information About Databases and Tables ............................................................... 276
3.5 Using mysql in Batch Mode .............................................................................................. 277
3.6 Examples of Common Queries .......................................................................................... 278
3.6.1 The Maximum Value for a Column ......................................................................... 279
3.6.2 The Row Holding the Maximum of a Certain Column ............................................... 279
3.6.3 Maximum of Column per Group .............................................................................. 280
3.6.4 The Rows Holding the Group-wise Maximum of a Certain Column ............................ 280
3.6.5 Using User-Defined Variables ................................................................................. 281
3.6.6 Using Foreign Keys ................................................................................................ 281
3.6.7 Searching on Two Keys ......................................................................................... 283
3.6.8 Calculating Visits Per Day ...................................................................................... 283
3.6.9 Using AUTO_INCREMENT ..................................................................................... 284
3.7 Using MySQL with Apache ............................................................................................... 286
MySQL 8.0 Reference Manual
v
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 Connecting Using a Path ........................................................................................ 298
4.2.4 Specifying Program Options ................................................................................... 302
4.2.5 Using Options on the Command Line ..................................................................... 303
4.2.6 Program Option Modifiers ....................................................................................... 305
4.2.7 Using Option Files ................................................................................................. 306
4.2.8 Command-Line Options that Affect Option-File Handling .......................................... 311
4.2.9 Using Options to Set Program Variables ................................................................. 312
4.2.10 Option Defaults, Options Expecting Values, and the = Sign .................................... 313
4.2.11 Setting Environment Variables .............................................................................. 317
4.3 MySQL Server and Server-Startup Programs ..................................................................... 318
4.3.1 mysqld — The MySQL Server ............................................................................... 318
4.3.2 mysqld_safe — MySQL Server Startup Script ...................................................... 318
4.3.3 mysql.server — MySQL Server Startup Script .................................................... 324
4.3.4 mysqld_multi — Manage Multiple MySQL Servers ............................................... 327
4.4 MySQL Installation-Related Programs ................................................................................ 331
4.4.1 comp_err — Compile MySQL Error Message File .................................................. 331
4.4.2 mysql_secure_installation — Improve MySQL Installation Security ................ 332
4.4.3 mysql_ssl_rsa_setup — Create SSL/RSA Files ................................................. 335
4.4.4 mysql_tzinfo_to_sql — Load the Time Zone Tables ......................................... 338
4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables ......................................... 338
4.5 MySQL Client Programs ................................................................................................... 346
4.5.1 mysql — The MySQL Command-Line Tool ............................................................ 346
4.5.2 mysqladmin — Client for Administering a MySQL Server ....................................... 373
4.5.3 mysqlcheck — A Table Maintenance Program ...................................................... 383
4.5.4 mysqldump — A Database Backup Program .......................................................... 391
4.5.5 mysqlimport — A Data Import Program ............................................................... 414
4.5.6 mysqlpump — A Database Backup Program .......................................................... 422
4.5.7 mysqlshow — Display Database, Table, and Column Information ............................ 438
4.5.8 mysqlslap — Load Emulation Client ..................................................................... 444
4.6 MySQL Administrative and Utility Programs ....................................................................... 453
4.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility ............................................. 453
4.6.2 innochecksum — Offline InnoDB File Checksum Utility .......................................... 456
4.6.3 myisam_ftdump — Display Full-Text Index information .......................................... 462
4.6.4 myisamchk — MyISAM Table-Maintenance Utility .................................................. 463
4.6.5 myisamlog — Display MyISAM Log File Contents .................................................. 480
4.6.6 myisampack — Generate Compressed, Read-Only MyISAM Tables ........................ 481
4.6.7 mysql_config_editor — MySQL Configuration Utility ......................................... 488
4.6.8 mysqlbinlog — Utility for Processing Binary Log Files .......................................... 494
4.6.9 mysqldumpslow — Summarize Slow Query Log Files ............................................ 516
4.7 MySQL Program Development Utilities .............................................................................. 518
4.7.1 mysql_config — Display Options for Compiling Clients ........................................ 518
4.7.2 my_print_defaults — Display Options from Option Files .................................... 520
4.7.3 resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols ............. 521
4.8 Miscellaneous Programs ................................................................................................... 521
4.8.1 lz4_decompress — Decompress mysqlpump LZ4-Compressed Output .................. 521
4.8.2 perror — Explain Error Codes ............................................................................. 522
4.8.3 resolveip — Resolve Host name to IP Address or Vice Versa .............................. 523
4.8.4 zlib_decompress — Decompress mysqlpump ZLIB-Compressed Output ............... 523
4.9 MySQL Program Environment Variables ............................................................................ 524
剩余5449页未读,继续阅读
资源评论
- 訍諦誵諌2020-04-21这是英文版手册...
candon123
- 粉丝: 1
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功