没有合适的资源?快使用搜索试试~ 我知道了~
mysql5.6官方参考文档-en1
试读
4468页
需积分: 0 0 下载量 81 浏览量
更新于2022-08-03
收藏 40.1MB PDF 举报
MySQL 5.6是MySQL数据库管理系统的一个重要版本,它提供了许多增强的功能和改进,旨在提高性能、可扩展性和数据安全性。本参考手册详细记录了MySQL 5.6从5.6.40版本到NDB Cluster 7.3-7.4的相关内容,包括基于这些版本的NDB集群的特定版本。
MySQL 5.6的关键特性之一是InnoDB存储引擎的增强。InnoDB在5.6版本中引入了更多的并行处理能力,如并行插入线程,这大大提高了大型事务处理的速度。此外,InnoDB还支持压缩表,这可以减少存储空间需求,同时提高I/O密集型操作的性能。
另一个重要的提升是查询优化器的改进。MySQL 5.6引入了更智能的查询优化策略,包括统计信息的动态更新和更好的成本估算,使得数据库能更准确地选择执行计划,从而提高查询效率。此外,5.6版本还支持并行查询执行,允许在多核系统上并行处理部分查询,进一步提升了查询速度。
在复制功能方面,MySQL 5.6引入了半同步复制,这是一种确保主从复制数据一致性的机制。这种模式保证了至少有一个从服务器接收到并确认了主服务器上的事务,从而降低了数据丢失的风险。
安全性和审计也是5.6版本的重点。MySQL 5.6提供更精细的权限控制和用户管理,增强了密码安全策略,并引入了审计插件,使得管理员可以跟踪和记录数据库活动,满足合规性要求。
MySQL 5.6对分区功能也进行了扩展,支持更多的分区类型和更灵活的分区策略,使得大数据管理和分析更为高效。同时,新的存储过程和触发器语言特性提升了应用程序的复杂性和灵活性。
关于NDB Cluster,这是MySQL的一种分布式内存数据库集群解决方案,7.3和7.4版本在MySQL 5.6基础上提供了更高的可用性和性能。NDB Cluster支持自动故障恢复和数据分布,能够处理大量并发读写操作,适用于高吞吐量的实时应用。
请注意,不同版本的MySQL 5.6可能包含不同的特性集。商业版和社区版之间的差异可能会导致某些功能在特定版本中不可用。如果你不确定你的许可证包含了哪些特性,应参考你的MySQL 5.6许可协议或联系Oracle销售代表以获取确切信息。
此外,MySQL 5.6可能包含第三方软件,这些软件根据许可协议使用。对于商业版的MySQL 5.6和NDB Cluster 7.3或7.4,文档中提供了相关的许可信息,包括可能包含在商业版中的第三方软件的许可信息。对于社区版,同样需要查阅文档了解许可信息,特别是与社区版中可能包含的第三方软件相关的许可条款。
MySQL 5.6是数据库管理员和开发人员的重要资源,提供了一系列的性能优化和功能增强,而NDB Cluster则为高可用性和高性能场景提供了强大的解决方案。通过深入理解和充分利用这些特性,用户可以构建更加稳定、高效和安全的数据库系统。
MySQL 5.6 Reference Manual
Including MySQL NDB Cluster 7.3-7.4 Reference Guide
Abstract
This is the MySQL™ Reference Manual. It documents MySQL 5.6 through 5.6.40, as well as NDB Cluster releases
based on versions 7.3 and 7.4 of NDB through 5.6.38-ndb-7.3.20 and 5.6.38-ndb-7.4.18, respectively.
MySQL 5.6 features. This manual describes features that are not included in every edition of MySQL 5.6; such
features may not be included in the edition of MySQL 5.6 licensed to you. If you have any questions about the
features included in your edition of MySQL 5.6, refer to your MySQL 5.6 license agreement or contact your Oracle
sales representative.
For notes detailing the changes in each release, see the MySQL 5.6 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.6. This product may include third-party software, used under license. If you are
using a Commercial release of MySQL 5.6, 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.6, see this document for licensing information, including licensing information relating to third-party
software that may be included in this Community release.
Licensing information—NDB Cluster. This product may include third-party software, used under license. If you
are using a Commercial release of MySQL NDB Cluster 7.3 or NDB 7.4, 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 NDB Cluster 7.3 or NDB 7.4, 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: 2018-01-10 (revision: 55408)
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.6 .................................................................................................. 9
1.5 MySQL Information Sources ............................................................................................... 22
1.5.1 MySQL Websites ..................................................................................................... 22
1.5.2 MySQL Mailing Lists ................................................................................................ 22
1.5.3 MySQL Community Support at the MySQL Forums ................................................... 24
1.5.4 MySQL Community Support on Internet Relay Chat (IRC) .......................................... 25
1.5.5 MySQL Enterprise .................................................................................................... 25
1.6 How to Report Bugs or Problems ........................................................................................ 25
1.7 MySQL Standards Compliance ............................................................................................ 30
1.7.1 MySQL Extensions to Standard SQL ........................................................................ 31
1.7.2 MySQL Differences from Standard SQL .................................................................... 34
1.7.3 How MySQL Deals with Constraints ......................................................................... 36
1.8 Credits ............................................................................................................................... 39
1.8.1 Contributors to MySQL ............................................................................................. 39
1.8.2 Documenters and translators .................................................................................... 44
1.8.3 Packages that support MySQL ................................................................................. 45
1.8.4 Tools that were used to create MySQL ..................................................................... 46
1.8.5 Supporters of MySQL .............................................................................................. 46
2 Installing and Upgrading MySQL .................................................................................................... 49
2.1 General Installation Guidance ............................................................................................. 51
2.1.1 Which MySQL Version and Distribution to Install ....................................................... 51
2.1.2 How to Get MySQL ................................................................................................. 53
2.1.3 Verifying Package Integrity Using MD5 Checksums or GnuPG ................................... 53
2.1.4 Installation Layouts .................................................................................................. 67
2.1.5 Compiler-Specific Build Characteristics ..................................................................... 67
2.2 Installing MySQL on Unix/Linux Using Generic Binaries ........................................................ 67
2.3 Installing MySQL on Microsoft Windows .............................................................................. 70
2.3.1 MySQL Installation Layout on Microsoft Windows ...................................................... 73
2.3.2 Choosing an Installation Package ............................................................................. 74
2.3.3 MySQL Installer for Windows ................................................................................... 74
2.3.4 MySQL Notifier ........................................................................................................ 94
2.3.5 Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive ................. 105
2.3.6 Troubleshooting a Microsoft Windows MySQL Server Installation .............................. 114
2.3.7 Windows Postinstallation Procedures ...................................................................... 116
2.3.8 Upgrading MySQL on Windows .............................................................................. 118
2.3.9 Deploying MySQL on Windows and Other Non-Linux Platforms ................................ 119
2.4 Installing MySQL on OS X ................................................................................................ 120
2.4.1 General Notes on Installing MySQL on OS X .......................................................... 120
2.4.2 Installing MySQL on OS X Using Native Packages .................................................. 121
2.4.3 Installing a MySQL Launch Daemon ....................................................................... 126
2.4.4 Installing and Using the MySQL Preference Pane .................................................... 128
2.5 Installing MySQL on Linux ................................................................................................ 133
2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository .................................. 134
MySQL 5.6 Reference Manual
iv
2.5.2 Replacing a Third-Party Distribution of MySQL Using the MySQL Yum Repository ..... 138
2.5.3 Installing MySQL on Linux Using the MySQL APT Repository ................................... 140
2.5.4 Installing MySQL on Linux Using the MySQL SLES Repository ................................. 141
2.5.5 Installing MySQL on Linux Using RPM Packages from Oracle .................................. 141
2.5.6 Installing MySQL on Linux Using Debian Packages from Oracle ............................... 146
2.5.7 Installing MySQL on Linux from the Native Software Repositories ............................. 148
2.5.8 Deploying MySQL on Linux with Docker .................................................................. 152
2.5.9 Installing MySQL on Linux with Juju ....................................................................... 159
2.6 Installing MySQL Using Unbreakable Linux Network (ULN) ................................................. 159
2.7 Installing MySQL on Solaris .............................................................................................. 160
2.7.1 Installing MySQL on Solaris Using a Solaris PKG .................................................... 161
2.8 Installing MySQL on FreeBSD ........................................................................................... 162
2.9 Installing MySQL from Source ........................................................................................... 162
2.9.1 MySQL Layout for Source Installation ..................................................................... 164
2.9.2 Installing MySQL Using a Standard Source Distribution ............................................ 164
2.9.3 Installing MySQL Using a Development Source Tree ............................................... 169
2.9.4 MySQL Source-Configuration Options ..................................................................... 171
2.9.5 Dealing with Problems Compiling MySQL ................................................................ 185
2.9.6 MySQL Configuration and Third-Party Tools ............................................................ 187
2.10 Postinstallation Setup and Testing ................................................................................... 187
2.10.1 Initializing the Data Directory ................................................................................ 188
2.10.2 Starting the Server ............................................................................................... 191
2.10.3 Testing the Server ................................................................................................ 194
2.10.4 Securing the Initial MySQL Accounts .................................................................... 196
2.10.5 Starting and Stopping MySQL Automatically .......................................................... 200
2.11 Upgrading or Downgrading MySQL .................................................................................. 201
2.11.1 Upgrading MySQL ................................................................................................ 201
2.11.2 Downgrading MySQL ........................................................................................... 214
2.11.3 Rebuilding or Repairing Tables or Indexes ............................................................ 220
2.11.4 Copying MySQL Databases to Another Machine .................................................... 221
2.12 Perl Installation Notes ..................................................................................................... 222
2.12.1 Installing Perl on Unix .......................................................................................... 222
2.12.2 Installing ActiveState Perl on Windows .................................................................. 223
2.12.3 Problems Using the Perl DBI/DBD Interface .......................................................... 224
3 Tutorial ........................................................................................................................................ 227
3.1 Connecting to and Disconnecting from the Server .............................................................. 227
3.2 Entering Queries ............................................................................................................... 228
3.3 Creating and Using a Database ........................................................................................ 231
3.3.1 Creating and Selecting a Database ......................................................................... 233
3.3.2 Creating a Table .................................................................................................... 233
3.3.3 Loading Data into a Table ...................................................................................... 235
3.3.4 Retrieving Information from a Table ........................................................................ 236
3.4 Getting Information About Databases and Tables ............................................................... 250
3.5 Using mysql in Batch Mode .............................................................................................. 251
3.6 Examples of Common Queries .......................................................................................... 252
3.6.1 The Maximum Value for a Column ......................................................................... 253
3.6.2 The Row Holding the Maximum of a Certain Column ............................................... 253
3.6.3 Maximum of Column per Group .............................................................................. 254
3.6.4 The Rows Holding the Group-wise Maximum of a Certain Column ............................ 254
3.6.5 Using User-Defined Variables ................................................................................. 255
3.6.6 Using Foreign Keys ................................................................................................ 255
3.6.7 Searching on Two Keys ......................................................................................... 257
3.6.8 Calculating Visits Per Day ...................................................................................... 257
3.6.9 Using AUTO_INCREMENT ..................................................................................... 258
MySQL 5.6 Reference Manual
v
3.7 Using MySQL with Apache ............................................................................................... 260
4 MySQL Programs ........................................................................................................................ 261
4.1 Overview of MySQL Programs .......................................................................................... 262
4.2 Using MySQL Programs ................................................................................................... 267
4.2.1 Invoking MySQL Programs ..................................................................................... 267
4.2.2 Connecting to the MySQL Server ........................................................................... 267
4.2.3 Specifying Program Options ................................................................................... 271
4.2.4 Using Options on the Command Line ..................................................................... 272
4.2.5 Program Option Modifiers ....................................................................................... 274
4.2.6 Using Option Files ................................................................................................. 274
4.2.7 Command-Line Options that Affect Option-File Handling .......................................... 280
4.2.8 Using Options to Set Program Variables ................................................................. 281
4.2.9 Option Defaults, Options Expecting Values, and the = Sign ...................................... 282
4.2.10 Setting Environment Variables .............................................................................. 286
4.3 MySQL Server and Server-Startup Programs ..................................................................... 287
4.3.1 mysqld — The MySQL Server ............................................................................... 287
4.3.2 mysqld_safe — MySQL Server Startup Script ...................................................... 287
4.3.3 mysql.server — MySQL Server Startup Script .................................................... 292
4.3.4 mysqld_multi — Manage Multiple MySQL Servers ............................................... 295
4.4 MySQL Installation-Related Programs ................................................................................ 299
4.4.1 comp_err — Compile MySQL Error Message File .................................................. 299
4.4.2 mysqlbug — Generate Bug Report ....................................................................... 300
4.4.3 mysql_install_db — Initialize MySQL Data Directory ......................................... 300
4.4.4 mysql_plugin — Configure MySQL Server Plugins .............................................. 304
4.4.5 mysql_secure_installation — Improve MySQL Installation Security ................ 306
4.4.6 mysql_tzinfo_to_sql — Load the Time Zone Tables ......................................... 306
4.4.7 mysql_upgrade — Check and Upgrade MySQL Tables ......................................... 307
4.5 MySQL Client Programs ................................................................................................... 313
4.5.1 mysql — The MySQL Command-Line Tool ............................................................ 313
4.5.2 mysqladmin — Client for Administering a MySQL Server ....................................... 337
4.5.3 mysqlcheck — A Table Maintenance Program ...................................................... 346
4.5.4 mysqldump — A Database Backup Program .......................................................... 354
4.5.5 mysqlimport — A Data Import Program ............................................................... 375
4.5.6 mysqlshow — Display Database, Table, and Column Information ............................ 382
4.5.7 mysqlslap — Load Emulation Client ..................................................................... 387
4.6 MySQL Administrative and Utility Programs ....................................................................... 395
4.6.1 innochecksum — Offline InnoDB File Checksum Utility .......................................... 395
4.6.2 myisam_ftdump — Display Full-Text Index information .......................................... 396
4.6.3 myisamchk — MyISAM Table-Maintenance Utility .................................................. 397
4.6.4 myisamlog — Display MyISAM Log File Contents .................................................. 415
4.6.5 myisampack — Generate Compressed, Read-Only MyISAM Tables ........................ 416
4.6.6 mysql_config_editor — MySQL Configuration Utility ......................................... 422
4.6.7 mysqlaccess — Client for Checking Access Privileges .......................................... 428
4.6.8 mysqlbinlog — Utility for Processing Binary Log Files .......................................... 431
4.6.9 mysqldumpslow — Summarize Slow Query Log Files ............................................ 452
4.6.10 mysqlhotcopy — A Database Backup Program .................................................. 454
4.6.11 mysql_convert_table_format — Convert Tables to Use a Given Storage
Engine ............................................................................................................................ 457
4.6.12 mysql_find_rows — Extract SQL Statements from Files .................................... 458
4.6.13 mysql_fix_extensions — Normalize Table File Name Extensions .................... 459
4.6.14 mysql_setpermission — Interactively Set Permissions in Grant Tables .............. 460
4.6.15 mysql_waitpid — Kill Process and Wait for Its Termination ................................ 460
4.6.16 mysql_zap — Kill Processes That Match a Pattern .............................................. 461
4.7 MySQL Program Development Utilities .............................................................................. 462
剩余4467页未读,继续阅读
资源推荐
资源评论
5星 · 资源好评率100%
114 浏览量
146 浏览量
108 浏览量
5星 · 资源好评率100%
157 浏览量
143 浏览量
2015-09-08 上传
2013-09-30 上传
158 浏览量
2021-11-03 上传
2017-06-23 上传
121 浏览量
170 浏览量
109 浏览量
168 浏览量
135 浏览量
149 浏览量
171 浏览量
144 浏览量
2020-09-09 上传
133 浏览量
101 浏览量
172 浏览量
201 浏览量
5星 · 资源好评率100%
120 浏览量
5星 · 资源好评率100%
151 浏览量
157 浏览量
资源评论
莫少儒
- 粉丝: 31
- 资源: 311
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Matlab实现SSA-CNN-LSTM-Mutilhead-Attention麻雀算法优化卷积长短期记忆神经网络融合多头注意力机制多变量回归预测的详细项目实例(含完整的程序,GUI设计和代码详解)
- Matlab基于BiTCN-LSTM双向时间卷积长短期记忆神经网络时间序列预测的详细项目实例(含完整的程序,GUI设计和代码详解)
- 并联型APF 有源电力滤波器 Matlab Simulink仿真 *dq FBD谐波 无功检测 *两相旋转坐标系(dq)、两相静止坐标系(αβ)下的PI控制 *SVPWM调制方式 (含仿真介绍文档)
- 毕业设计-基于springBoot的相册管理系统-后端代码+数据库.zip
- MATLAB 实现基于随机森林回归(Random Forest)进行时间序列预测模型的项目详细实例(含完整的程序,GUI设计和代码详解)
- MATLAB 实现基于支持向量回归(SVR)进行时间序列预测模型的项目详细实例(含完整的程序,GUI设计和代码详解)
- MATLAB 实现基于指数平滑法(ETS)进行时间序列预测模型的项目详细实例(含完整的程序,GUI设计和代码详解)
- MATLAB 实现基于季节性自回归积分滑动平均模型(SARIMA)进行时间序列预测模型的项目详细实例(含完整的程序,GUI设计和代码详解)
- MATLAB 实现基于自回归积分滑动平均模型(ARIMA)进行时间序列预测模型的项目详细实例(含完整的程序,GUI设计和代码详解)
- 基于遗传算法的车间调度 已知加工时间,如何确定加工顺序和工件分配情况,使得最大完工时间极小化 内涵详细的代码注释
- Matlab实现基于LSTM-Adaboost长短期记忆神经网络结合Adaboost集成学习时间序列预测(含完整的程序,GUI设计和代码详解)
- Python-3.8.3.zip
- Matlab实现基于GRU-Adaboost门控循环单元结合Adaboost集成学习时间序列预测(含完整的程序,GUI设计和代码详解)
- 基于java+ssm+mysql的成绩管理系统开题报告.docx
- 飞轮储能机侧+网侧控制simulink模型 永磁同步电机飞轮储能充放电系统 可并网充放电,功率可控、母线电压可控 有600kW和22kW两个功率等级,均可并网
- 毕业设计基于mediapipe的手语识别python源码+全部数据(高分毕设)
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功