没有合适的资源?快使用搜索试试~ 我知道了~
首页mysql官方文档(PDF)
资源详情
资源评论
资源推荐
MySQL 8.0 Reference Manual
Including MySQL NDB Cluster 8.0
Abstract
This is the MySQL™ Reference Manual. It documents MySQL 8.0 through 8.0.17, as well as NDB Cluster releases
based on version 8.0 of NDB through 8.0.15-ndb-8.0.15, 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 8.0 Release Notes.
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: 2019-02-23 (revision: 61045)
iii
Table of Contents
Preface and Legal Notices .............................................................................................................. xxix
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 ....... 30
1.6 MySQL Information Sources ............................................................................................... 42
1.6.1 MySQL Websites ..................................................................................................... 42
1.6.2 MySQL Mailing Lists ................................................................................................ 42
1.6.3 MySQL Community Support at the MySQL Forums ................................................... 45
1.6.4 MySQL Community Support on Internet Relay Chat (IRC) .......................................... 45
1.6.5 MySQL Enterprise .................................................................................................... 45
1.7 How to Report Bugs or Problems ........................................................................................ 46
1.8 MySQL Standards Compliance ............................................................................................ 50
1.8.1 MySQL Extensions to Standard SQL ........................................................................ 51
1.8.2 MySQL Differences from Standard SQL .................................................................... 54
1.8.3 How MySQL Deals with Constraints ......................................................................... 56
1.9 Credits ............................................................................................................................... 59
1.9.1 Contributors to MySQL ............................................................................................. 59
1.9.2 Documenters and translators .................................................................................... 64
1.9.3 Packages that support MySQL ................................................................................. 65
1.9.4 Tools that were used to create MySQL ..................................................................... 66
1.9.5 Supporters of MySQL .............................................................................................. 66
2 Installing and Upgrading MySQL .................................................................................................... 69
2.1 General Installation Guidance ............................................................................................. 72
2.1.1 Which MySQL Version and Distribution to Install ....................................................... 72
2.1.2 How to Get MySQL ................................................................................................. 73
2.1.3 Verifying Package Integrity Using MD5 Checksums or GnuPG ................................... 73
2.1.4 Installation Layouts .................................................................................................. 87
2.1.5 Compiler-Specific Build Characteristics ..................................................................... 87
2.2 Installing MySQL on Unix/Linux Using Generic Binaries ........................................................ 87
2.3 Installing MySQL on Microsoft Windows .............................................................................. 90
2.3.1 MySQL Installation Layout on Microsoft Windows ...................................................... 93
2.3.2 Choosing an Installation Package ............................................................................. 93
2.3.3 MySQL Installer for Windows ................................................................................... 94
2.3.4 MySQL Notifier ...................................................................................................... 118
2.3.5 Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive ................. 130
2.3.6 Troubleshooting a Microsoft Windows MySQL Server Installation .............................. 138
2.3.7 Windows Postinstallation Procedures ...................................................................... 140
2.4 Installing MySQL on macOS ............................................................................................. 142
2.4.1 General Notes on Installing MySQL on macOS ....................................................... 142
2.4.2 Installing MySQL on macOS Using Native Packages ............................................... 143
2.4.3 Installing and Using the MySQL Launch Daemon .................................................... 148
2.4.4 Installing and Using the MySQL Preference Pane .................................................... 151
2.5 Installing MySQL on Linux ................................................................................................ 155
2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository .................................. 156
2.5.2 Installing MySQL on Linux Using the MySQL APT Repository ................................... 161
MySQL 8.0 Reference Manual
iv
2.5.3 Installing MySQL on Linux Using the MySQL SLES Repository ................................. 161
2.5.4 Installing MySQL on Linux Using RPM Packages from Oracle .................................. 161
2.5.5 Installing MySQL on Linux Using Debian Packages from Oracle ............................... 166
2.5.6 Deploying MySQL on Linux with Docker .................................................................. 167
2.5.7 Installing MySQL on Linux from the Native Software Repositories ............................. 179
2.5.8 Installing MySQL on Linux with Juju ....................................................................... 182
2.5.9 Managing MySQL Server with systemd ................................................................... 182
2.6 Installing MySQL Using Unbreakable Linux Network (ULN) ................................................. 188
2.7 Installing MySQL on Solaris .............................................................................................. 189
2.7.1 Installing MySQL on Solaris Using a Solaris PKG .................................................... 190
2.8 Installing MySQL on FreeBSD ........................................................................................... 191
2.9 Installing MySQL from Source ........................................................................................... 192
2.9.1 MySQL Layout for Source Installation ..................................................................... 194
2.9.2 Installing MySQL Using a Standard Source Distribution ............................................ 194
2.9.3 Installing MySQL Using a Development Source Tree ............................................... 199
2.9.4 MySQL Source-Configuration Options ..................................................................... 201
2.9.5 Dealing with Problems Compiling MySQL ................................................................ 225
2.9.6 MySQL Configuration and Third-Party Tools ............................................................ 227
2.9.7 Generating MySQL Doxygen Documentation Content .............................................. 227
2.10 Postinstallation Setup and Testing ................................................................................... 228
2.10.1 Initializing the Data Directory ................................................................................ 229
2.10.2 Starting the Server ............................................................................................... 234
2.10.3 Testing the Server ................................................................................................ 237
2.10.4 Securing the Initial MySQL Account ...................................................................... 239
2.10.5 Starting and Stopping MySQL Automatically .......................................................... 241
2.11 Upgrading MySQL .......................................................................................................... 242
2.11.1 Before You Begin ................................................................................................. 243
2.11.2 Upgrade Paths ..................................................................................................... 244
2.11.3 What the MySQL Upgrade Process Upgrades ....................................................... 244
2.11.4 Changes in MySQL 8.0 ........................................................................................ 248
2.11.5 Preparing Your Installation for Upgrade ................................................................. 257
2.11.6 Upgrading MySQL Binary or Package-based Installations on Unix/Linux .................. 259
2.11.7 Upgrading MySQL with the MySQL Yum Repository .............................................. 264
2.11.8 Upgrading MySQL with the MySQL APT Repository .............................................. 266
2.11.9 Upgrading MySQL with the MySQL SLES Repository ............................................ 266
2.11.10 Upgrading MySQL on Windows .......................................................................... 266
2.11.11 Upgrading a Docker Installation of MySQL .......................................................... 268
2.11.12 Upgrade Troubleshooting .................................................................................... 268
2.11.13 Rebuilding or Repairing Tables or Indexes .......................................................... 269
2.11.14 Copying MySQL Databases to Another Machine .................................................. 270
2.12 Downgrading MySQL ...................................................................................................... 271
2.13 Perl Installation Notes ..................................................................................................... 271
2.13.1 Installing Perl on Unix .......................................................................................... 272
2.13.2 Installing ActiveState Perl on Windows .................................................................. 273
2.13.3 Problems Using the Perl DBI/DBD Interface .......................................................... 273
3 Tutorial ........................................................................................................................................ 275
3.1 Connecting to and Disconnecting from the Server .............................................................. 275
3.2 Entering Queries ............................................................................................................... 276
3.3 Creating and Using a Database ........................................................................................ 280
3.3.1 Creating and Selecting a Database ......................................................................... 281
3.3.2 Creating a Table .................................................................................................... 282
3.3.3 Loading Data into a Table ...................................................................................... 283
3.3.4 Retrieving Information from a Table ........................................................................ 284
3.4 Getting Information About Databases and Tables ............................................................... 298
MySQL 8.0 Reference Manual
v
3.5 Using mysql in Batch Mode .............................................................................................. 299
3.6 Examples of Common Queries .......................................................................................... 301
3.6.1 The Maximum Value for a Column ......................................................................... 302
3.6.2 The Row Holding the Maximum of a Certain Column ............................................... 302
3.6.3 Maximum of Column per Group .............................................................................. 302
3.6.4 The Rows Holding the Group-wise Maximum of a Certain Column ............................ 303
3.6.5 Using User-Defined Variables ................................................................................. 304
3.6.6 Using Foreign Keys ................................................................................................ 304
3.6.7 Searching on Two Keys ......................................................................................... 306
3.6.8 Calculating Visits Per Day ...................................................................................... 306
3.6.9 Using AUTO_INCREMENT ..................................................................................... 307
3.7 Using MySQL with Apache ............................................................................................... 309
4 MySQL Programs ........................................................................................................................ 311
4.1 Overview of MySQL Programs .......................................................................................... 312
4.2 Using MySQL Programs ................................................................................................... 316
4.2.1 Invoking MySQL Programs ..................................................................................... 316
4.2.2 Connecting to the MySQL Server ........................................................................... 316
4.2.3 Connecting Using a URI or Key-Value Pairs ............................................................ 321
4.2.4 Specifying Program Options ................................................................................... 325
4.2.5 Using Options on the Command Line ..................................................................... 326
4.2.6 Program Option Modifiers ....................................................................................... 328
4.2.7 Using Option Files ................................................................................................. 329
4.2.8 Command-Line Options that Affect Option-File Handling .......................................... 334
4.2.9 Using Options to Set Program Variables ................................................................. 335
4.2.10 Option Defaults, Options Expecting Values, and the = Sign .................................... 336
4.2.11 Setting Environment Variables .............................................................................. 340
4.3 MySQL Server and Server-Startup Programs ..................................................................... 341
4.3.1 mysqld — The MySQL Server ............................................................................... 341
4.3.2 mysqld_safe — MySQL Server Startup Script ...................................................... 341
4.3.3 mysql.server — MySQL Server Startup Script .................................................... 347
4.3.4 mysqld_multi — Manage Multiple MySQL Servers ............................................... 350
4.4 MySQL Installation-Related Programs ................................................................................ 354
4.4.1 comp_err — Compile MySQL Error Message File .................................................. 354
4.4.2 mysql_secure_installation — Improve MySQL Installation Security ................ 355
4.4.3 mysql_ssl_rsa_setup — Create SSL/RSA Files ................................................. 358
4.4.4 mysql_tzinfo_to_sql — Load the Time Zone Tables ......................................... 361
4.4.5 mysql_upgrade — Check and Upgrade MySQL Tables ......................................... 362
4.5 MySQL Client Programs ................................................................................................... 370
4.5.1 mysql — The MySQL Command-Line Client .......................................................... 370
4.5.2 mysqladmin — Client for Administering a MySQL Server ....................................... 398
4.5.3 mysqlcheck — A Table Maintenance Program ...................................................... 409
4.5.4 mysqldump — A Database Backup Program .......................................................... 418
4.5.5 mysqlimport — A Data Import Program ............................................................... 441
4.5.6 mysqlpump — A Database Backup Program .......................................................... 449
4.5.7 mysqlshow — Display Database, Table, and Column Information ............................ 465
4.5.8 mysqlslap — Load Emulation Client ..................................................................... 472
4.6 MySQL Administrative and Utility Programs ....................................................................... 482
4.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility ............................................. 482
4.6.2 innochecksum — Offline InnoDB File Checksum Utility .......................................... 485
4.6.3 myisam_ftdump — Display Full-Text Index information .......................................... 491
4.6.4 myisamchk — MyISAM Table-Maintenance Utility .................................................. 492
4.6.5 myisamlog — Display MyISAM Log File Contents .................................................. 509
4.6.6 myisampack — Generate Compressed, Read-Only MyISAM Tables ........................ 510
4.6.7 mysql_config_editor — MySQL Configuration Utility ......................................... 516
剩余6407页未读,继续阅读
慢慢来_
- 粉丝: 134
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- stc12c5a60s2 例程
- Android通过全局变量传递数据
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0