没有合适的资源?快使用搜索试试~ 我知道了~
首页"MySQL 8.0参考手册及NDB Cluster 8.0详解"
"MySQL 8.0参考手册及NDB Cluster 8.0详解"
需积分: 11 0 下载量 61 浏览量
更新于2024-01-17
收藏 42.38MB PDF 举报
MySQL是一个流行的开源关系型数据库管理系统,广泛用于各种Web应用程序的后端数据存储。MySQL 8.0参考手册是官方提供的详尽文档,介绍了MySQL 8.0版本的各种功能与用法。本手册还包括MySQL NDB Cluster 8.0的相关内容。
MySQL 8.0参考手册主要分为几个部分。第一部分是摘要,简要介绍了手册的内容和版本信息。在这里,我们了解到本手册覆盖了MySQL 8.0的所有发布版本,并包括了NDB Cluster的相关版本。此外,手册中还可能包含尚未发布的MySQL版本的文档。要了解已发布的版本信息,可以查看MySQL 8.0发布说明。
接下来,手册详细介绍了MySQL 8.0的各种功能。其中一些功能并不是每个版本都包含的,所以这个手册非常有用,可以帮助用户了解各个版本的差异和新增功能。无论您是初学者还是有经验的开发人员,都可以从这个手册中找到适合自己的文档。
MySQL 8.0参考手册遵循了清晰的结构和组织原则。每个功能都有专门的章节,其中包含详细的描述、示例和用法说明。手册中还提供了丰富的图表和表格,方便读者理解和记忆各种复杂的概念和语法。
此外,MySQL 8.0参考手册还包括了一些高级主题,如存储引擎、性能优化、备份和恢复、安全性等。这些主题涵盖了MySQL数据库管理的关键方面,对于需要深入了解MySQL的用户来说,是非常有价值的参考资料。
手册的最后一部分是附录,提供了一些附加信息和参考资料。例如,手册提供了MySQL函数和操作符的完整列表,以及一些常见问题的解答。这些附录可以帮助用户更好地理解和使用MySQL。
总之,MySQL 8.0参考手册是MySQL官方提供的权威文档,对于学习和使用MySQL 8.0的开发人员来说,是必不可少的参考资料。手册通过清晰的结构和有用的示例,帮助用户了解和掌握MySQL的各种功能和用法。无论您是初学者还是专业人士,MySQL 8.0参考手册都将成为您学习和使用MySQL的好帮手。
MySQL 8.0 Reference Manual
15.9 InnoDB Table and Page Compression ...................................................................... 3081
15.9.1 InnoDB Table Compression ........................................................................... 3081
15.9.2 InnoDB Page Compression ........................................................................... 3095
15.10 InnoDB Row Formats ............................................................................................ 3098
15.11 InnoDB Disk I/O and File Space Management ........................................................ 3104
15.11.1 InnoDB Disk I/O .......................................................................................... 3105
15.11.2 File Space Management ............................................................................. 3105
15.11.3 InnoDB Checkpoints ................................................................................... 3107
15.11.4 Defragmenting a Table ................................................................................ 3107
15.11.5 Reclaiming Disk Space with TRUNCATE TABLE .......................................... 3108
15.12 InnoDB and Online DDL ........................................................................................ 3108
15.12.1 Online DDL Operations ............................................................................... 3109
15.12.2 Online DDL Performance and Concurrency .................................................. 3123
15.12.3 Online DDL Space Requirements ................................................................ 3126
15.12.4 Online DDL Memory Management ............................................................... 3127
15.12.5 Configuring Parallel Threads for Online DDL Operations ............................... 3127
15.12.6 Simplifying DDL Statements with Online DDL ............................................... 3127
15.12.7 Online DDL Failure Conditions .................................................................... 3128
15.12.8 Online DDL Limitations ................................................................................ 3128
15.13 InnoDB Data-at-Rest Encryption ............................................................................. 3129
15.14 InnoDB Startup Options and System Variables ........................................................ 3138
15.15 InnoDB INFORMATION_SCHEMA Tables .............................................................. 3225
15.15.1 InnoDB INFORMATION_SCHEMA Tables about Compression ...................... 3226
15.15.2 InnoDB INFORMATION_SCHEMA Transaction and Locking Information ........ 3227
15.15.3 InnoDB INFORMATION_SCHEMA Schema Object Tables ............................ 3235
15.15.4 InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables ......................... 3240
15.15.5 InnoDB INFORMATION_SCHEMA Buffer Pool Tables .................................. 3243
15.15.6 InnoDB INFORMATION_SCHEMA Metrics Table ......................................... 3247
15.15.7 InnoDB INFORMATION_SCHEMA Temporary Table Info Table .................... 3256
15.15.8 Retrieving InnoDB Tablespace Metadata from
INFORMATION_SCHEMA.FILES ............................................................................. 3257
15.16 InnoDB Integration with MySQL Performance Schema ............................................ 3258
15.16.1 Monitoring ALTER TABLE Progress for InnoDB Tables Using Performance
Schema .................................................................................................................. 3260
15.16.2 Monitoring InnoDB Mutex Waits Using Performance Schema ........................ 3262
15.17 InnoDB Monitors .................................................................................................... 3265
15.17.1 InnoDB Monitor Types ................................................................................ 3265
15.17.2 Enabling InnoDB Monitors ........................................................................... 3266
15.17.3 InnoDB Standard Monitor and Lock Monitor Output ...................................... 3267
15.18 InnoDB Backup and Recovery ................................................................................ 3272
15.18.1 InnoDB Backup ........................................................................................... 3272
15.18.2 InnoDB Recovery ........................................................................................ 3273
15.19 InnoDB and MySQL Replication ............................................................................. 3275
15.20 InnoDB memcached Plugin .................................................................................... 3277
15.20.1 Benefits of the InnoDB memcached Plugin ................................................... 3278
15.20.2 InnoDB memcached Architecture ................................................................. 3279
15.20.3 Setting Up the InnoDB memcached Plugin ................................................... 3282
15.20.4 InnoDB memcached Multiple get and Range Query Support .......................... 3287
15.20.5 Security Considerations for the InnoDB memcached Plugin ........................... 3290
15.20.6 Writing Applications for the InnoDB memcached Plugin ................................. 3291
15.20.7 The InnoDB memcached Plugin and Replication ........................................... 3303
15.20.8 InnoDB memcached Plugin Internals ............................................................ 3307
15.20.9 Troubleshooting the InnoDB memcached Plugin ........................................... 3311
15.21 InnoDB Troubleshooting ......................................................................................... 3313
15.21.1 Troubleshooting InnoDB I/O Problems ......................................................... 3314
15.21.2 Troubleshooting Recovery Failures .............................................................. 3314
15.21.3 Forcing InnoDB Recovery ........................................................................... 3315
15.21.4 Troubleshooting InnoDB Data Dictionary Operations ..................................... 3316
xvi
MySQL 8.0 Reference Manual
15.21.5 InnoDB Error Handling ................................................................................ 3317
15.22 InnoDB Limits ........................................................................................................ 3318
15.23 InnoDB Restrictions and Limitations ....................................................................... 3319
16 Alternative Storage Engines ................................................................................................ 3321
16.1 Setting the Storage Engine ...................................................................................... 3324
16.2 The MyISAM Storage Engine ................................................................................... 3325
16.2.1 MyISAM Startup Options ............................................................................... 3328
16.2.2 Space Needed for Keys ................................................................................ 3329
16.2.3 MyISAM Table Storage Formats .................................................................... 3329
16.2.4 MyISAM Table Problems ............................................................................... 3332
16.3 The MEMORY Storage Engine ................................................................................ 3333
16.4 The CSV Storage Engine ........................................................................................ 3338
16.4.1 Repairing and Checking CSV Tables ............................................................. 3339
16.4.2 CSV Limitations ............................................................................................ 3339
16.5 The ARCHIVE Storage Engine ................................................................................. 3339
16.6 The BLACKHOLE Storage Engine ........................................................................... 3341
16.7 The MERGE Storage Engine ................................................................................... 3343
16.7.1 MERGE Table Advantages and Disadvantages .............................................. 3346
16.7.2 MERGE Table Problems ............................................................................... 3347
16.8 The FEDERATED Storage Engine ........................................................................... 3348
16.8.1 FEDERATED Storage Engine Overview ......................................................... 3348
16.8.2 How to Create FEDERATED Tables .............................................................. 3350
16.8.3 FEDERATED Storage Engine Notes and Tips ................................................ 3352
16.8.4 FEDERATED Storage Engine Resources ....................................................... 3354
16.9 The EXAMPLE Storage Engine ................................................................................ 3354
16.10 Other Storage Engines .......................................................................................... 3354
16.11 Overview of MySQL Storage Engine Architecture .................................................... 3354
16.11.1 Pluggable Storage Engine Architecture ........................................................ 3356
16.11.2 The Common Database Server Layer .......................................................... 3356
17 Replication ......................................................................................................................... 3359
17.1 Configuring Replication ............................................................................................ 3361
17.1.1 Binary Log File Position Based Replication Configuration Overview ................. 3361
17.1.2 Setting Up Binary Log File Position Based Replication .................................... 3362
17.1.3 Replication with Global Transaction Identifiers ................................................ 3373
17.1.4 Changing GTID Mode on Online Servers ....................................................... 3396
17.1.5 MySQL Multi-Source Replication ................................................................... 3402
17.1.6 Replication and Binary Logging Options and Variables .................................... 3409
17.1.7 Common Replication Administration Tasks ..................................................... 3523
17.2 Replication Implementation ...................................................................................... 3529
17.2.1 Replication Formats ...................................................................................... 3530
17.2.2 Replication Channels .................................................................................... 3537
17.2.3 Replication Threads ...................................................................................... 3541
17.2.4 Relay Log and Replication Metadata Repositories .......................................... 3544
17.2.5 How Servers Evaluate Replication Filtering Rules ........................................... 3551
17.3 Replication Security ................................................................................................. 3559
17.3.1 Setting Up Replication to Use Encrypted Connections .................................... 3559
17.3.2 Encrypting Binary Log Files and Relay Log Files ............................................ 3562
17.3.3 Replication Privilege Checks ......................................................................... 3566
17.4 Replication Solutions ............................................................................................... 3572
17.4.1 Using Replication for Backups ....................................................................... 3573
17.4.2 Handling an Unexpected Halt of a Replica ..................................................... 3576
17.4.3 Monitoring Row-based Replication ................................................................. 3579
17.4.4 Using Replication with Different Source and Replica Storage Engines .............. 3579
17.4.5 Using Replication for Scale-Out ..................................................................... 3580
17.4.6 Replicating Different Databases to Different Replicas ...................................... 3582
17.4.7 Improving Replication Performance ................................................................ 3583
17.4.8 Switching Sources During Failover ................................................................ 3584
17.4.9 Switching Sources and Replicas with Asynchronous Connection Failover ......... 3587
xvii
MySQL 8.0 Reference Manual
17.4.10 Semisynchronous Replication ...................................................................... 3590
17.4.11 Delayed Replication .................................................................................... 3596
17.5 Replication Notes and Tips ...................................................................................... 3599
17.5.1 Replication Features and Issues .................................................................... 3599
17.5.2 Replication Compatibility Between MySQL Versions ....................................... 3626
17.5.3 Upgrading a Replication Topology ................................................................. 3627
17.5.4 Troubleshooting Replication .......................................................................... 3629
17.5.5 How to Report Replication Bugs or Problems ................................................. 3630
18 Group Replication .............................................................................................................. 3633
18.1 Group Replication Background ................................................................................. 3634
18.1.1 Replication Technologies ............................................................................... 3635
18.1.2 Group Replication Use Cases ....................................................................... 3638
18.1.3 Multi-Primary and Single-Primary Modes ........................................................ 3639
18.1.4 Group Replication Services ........................................................................... 3643
18.1.5 Group Replication Plugin Architecture ............................................................ 3646
18.2 Getting Started ........................................................................................................ 3647
18.2.1 Deploying Group Replication in Single-Primary Mode ...................................... 3647
18.2.2 Deploying Group Replication Locally .............................................................. 3660
18.3 Requirements and Limitations .................................................................................. 3661
18.3.1 Group Replication Requirements ................................................................... 3661
18.3.2 Group Replication Limitations ........................................................................ 3664
18.4 Monitoring Group Replication ................................................................................... 3667
18.4.1 GTIDs and Group Replication ........................................................................ 3667
18.4.2 Group Replication Server States .................................................................... 3668
18.4.3 The replication_group_members Table .......................................................... 3669
18.4.4 The replication_group_member_stats Table ................................................... 3670
18.5 Group Replication Operations .................................................................................. 3670
18.5.1 Configuring an Online Group ......................................................................... 3670
18.5.2 Restarting a Group ....................................................................................... 3676
18.5.3 Transaction Consistency Guarantees ............................................................. 3678
18.5.4 Distributed Recovery ..................................................................................... 3684
18.5.5 Support For IPv6 And For Mixed IPv6 And IPv4 Groups ................................. 3699
18.5.6 Using MySQL Enterprise Backup with Group Replication ................................ 3701
18.6 Group Replication Security ....................................................................................... 3707
18.6.1 Methods for Connection Security Management ............................................... 3707
18.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL) . 3709
18.6.3 Securing Distributed Recovery Connections ................................................... 3711
18.6.4 Group Replication IP Address Permissions .................................................... 3715
18.7 Group Replication Performance and Troubleshooting ................................................ 3718
18.7.1 Fine Tuning the Group Communication Thread .............................................. 3718
18.7.2 Flow Control ................................................................................................. 3719
18.7.3 Single Consensus Leader ............................................................................. 3720
18.7.4 Message Compression .................................................................................. 3721
18.7.5 Message Fragmentation ................................................................................ 3723
18.7.6 XCom Cache Management ........................................................................... 3723
18.7.7 Responses to Failure Detection and Network Partitioning ................................ 3725
18.7.8 Handling a Network Partition and Loss of Quorum .......................................... 3731
18.8 Upgrading Group Replication ................................................................................... 3735
18.8.1 Combining Different Member Versions in a Group .......................................... 3736
18.8.2 Group Replication Offline Upgrade ................................................................ 3738
18.8.3 Group Replication Online Upgrade ................................................................ 3738
18.9 Group Replication System Variables ......................................................................... 3742
18.10 Frequently Asked Questions ................................................................................... 3784
19 MySQL Shell ...................................................................................................................... 3789
20 Using MySQL as a Document Store ................................................................................... 3791
20.1 Interfaces to a MySQL Document Store .................................................................... 3792
20.2 Document Store Concepts ....................................................................................... 3792
20.3 JavaScript Quick-Start Guide: MySQL Shell for Document Store ................................ 3793
xviii
MySQL 8.0 Reference Manual
20.3.1 MySQL Shell ................................................................................................ 3794
20.3.2 Download and Import world_x Database ........................................................ 3795
20.3.3 Documents and Collections ........................................................................... 3796
20.3.4 Relational Tables .......................................................................................... 3806
20.3.5 Documents in Tables .................................................................................... 3812
20.4 Python Quick-Start Guide: MySQL Shell for Document Store ..................................... 3813
20.4.1 MySQL Shell ................................................................................................ 3813
20.4.2 Download and Import world_x Database ........................................................ 3815
20.4.3 Documents and Collections ........................................................................... 3815
20.4.4 Relational Tables .......................................................................................... 3826
20.4.5 Documents in Tables .................................................................................... 3832
20.5 X Plugin .................................................................................................................. 3833
20.5.1 Checking X Plugin Installation ....................................................................... 3833
20.5.2 Disabling X Plugin ........................................................................................ 3833
20.5.3 Using Encrypted Connections with X Plugin ................................................... 3833
20.5.4 Using X Plugin with the Caching SHA-2 Authentication Plugin ......................... 3834
20.5.5 Connection Compression with X Plugin .......................................................... 3835
20.5.6 X Plugin Options and Variables ..................................................................... 3838
20.5.7 Monitoring X Plugin ...................................................................................... 3858
21 InnoDB Cluster ................................................................................................................... 3861
22 InnoDB ReplicaSet ............................................................................................................. 3865
23 MySQL NDB Cluster 8.0 .................................................................................................... 3867
23.1 General Information ................................................................................................. 3869
23.2 NDB Cluster Overview ............................................................................................. 3871
23.2.1 NDB Cluster Core Concepts .......................................................................... 3872
23.2.2 NDB Cluster Nodes, Node Groups, Fragment Replicas, and Partitions ............. 3875
23.2.3 NDB Cluster Hardware, Software, and Networking Requirements .................... 3877
23.2.4 What is New in NDB Cluster ......................................................................... 3879
23.2.5 Options, Variables, and Parameters Added, Deprecated or Removed in NDB
8.0 .......................................................................................................................... 3902
23.2.6 MySQL Server Using InnoDB Compared with NDB Cluster ............................. 3908
23.2.7 Known Limitations of NDB Cluster ................................................................. 3910
23.3 NDB Cluster Installation ........................................................................................... 3922
23.3.1 Installation of NDB Cluster on Linux .............................................................. 3924
23.3.2 Installing NDB Cluster on Windows ............................................................... 3932
23.3.3 Initial Configuration of NDB Cluster ............................................................... 3941
23.3.4 Initial Startup of NDB Cluster ........................................................................ 3943
23.3.5 NDB Cluster Example with Tables and Data .................................................. 3943
23.3.6 Safe Shutdown and Restart of NDB Cluster ................................................... 3947
23.3.7 Upgrading and Downgrading NDB Cluster ..................................................... 3947
23.3.8 The NDB Cluster Auto-Installer (No longer supported) .................................... 3950
23.4 Configuration of NDB Cluster ................................................................................... 3971
23.4.1 Quick Test Setup of NDB Cluster .................................................................. 3972
23.4.2 Overview of NDB Cluster Configuration Parameters, Options, and Variables ..... 3974
23.4.3 NDB Cluster Configuration Files .................................................................... 3994
23.4.4 Using High-Speed Interconnects with NDB Cluster ......................................... 4168
23.5 NDB Cluster Programs ............................................................................................ 4169
23.5.1 ndbd — The NDB Cluster Data Node Daemon ............................................... 4169
23.5.2 ndbinfo_select_all — Select From ndbinfo Tables ........................................... 4179
23.5.3 ndbmtd — The NDB Cluster Data Node Daemon (Multi-Threaded) .................. 4184
23.5.4 ndb_mgmd — The NDB Cluster Management Server Daemon ........................ 4185
23.5.5 ndb_mgm — The NDB Cluster Management Client ........................................ 4197
23.5.6 ndb_blob_tool — Check and Repair BLOB and TEXT columns of NDB Cluster
Tables ..................................................................................................................... 4202
23.5.7 ndb_config — Extract NDB Cluster Configuration Information .......................... 4208
23.5.8 ndb_delete_all — Delete All Rows from an NDB Table ................................... 4220
23.5.9 ndb_desc — Describe NDB Tables ............................................................... 4224
23.5.10 ndb_drop_index — Drop Index from an NDB Table ....................................... 4234
xix
MySQL 8.0 Reference Manual
23.5.11 ndb_drop_table — Drop an NDB Table ........................................................ 4238
23.5.12 ndb_error_reporter — NDB Error-Reporting Utility ......................................... 4242
23.5.13 ndb_import — Import CSV Data Into NDB .................................................... 4244
23.5.14 ndb_index_stat — NDB Index Statistics Utility .............................................. 4260
23.5.15 ndb_move_data — NDB Data Copy Utility ................................................... 4268
23.5.16 ndb_perror — Obtain NDB Error Message Information .................................. 4273
23.5.17 ndb_print_backup_file — Print NDB Backup File Contents ............................. 4276
23.5.18 ndb_print_file — Print NDB Disk Data File Contents ..................................... 4281
23.5.19 ndb_print_frag_file — Print NDB Fragment List File Contents ........................ 4281
23.5.20 ndb_print_schema_file — Print NDB Schema File Contents ........................... 4282
23.5.21 ndb_print_sys_file — Print NDB System File Contents .................................. 4283
23.5.22 ndb_redo_log_reader — Check and Print Content of Cluster Redo Log .......... 4283
23.5.23 ndb_restore — Restore an NDB Cluster Backup ........................................... 4285
23.5.24 ndb_select_all — Print Rows from an NDB Table ......................................... 4317
23.5.25 ndb_select_count — Print Row Counts for NDB Tables ................................. 4323
23.5.26 ndb_setup.py — Start browser-based Auto-Installer for NDB Cluster
(DEPRECATED) ...................................................................................................... 4327
23.5.27 ndb_show_tables — Display List of NDB Tables ........................................... 4331
23.5.28 ndb_size.pl — NDBCLUSTER Size Requirement Estimator ........................... 4335
23.5.29 ndb_top — View CPU usage information for NDB threads ............................. 4338
23.5.30 ndb_waiter — Wait for NDB Cluster to Reach a Given Status ........................ 4343
23.5.31 ndbxfrm — Compress, Decompress, Encrypt, and Decrypt Files Created by
NDB Cluster ............................................................................................................ 4349
23.6 Management of NDB Cluster ................................................................................... 4353
23.6.1 Commands in the NDB Cluster Management Client ........................................ 4354
23.6.2 NDB Cluster Log Messages .......................................................................... 4359
23.6.3 Event Reports Generated in NDB Cluster ...................................................... 4378
23.6.4 Summary of NDB Cluster Start Phases .......................................................... 4389
23.6.5 Performing a Rolling Restart of an NDB Cluster ............................................. 4391
23.6.6 NDB Cluster Single User Mode ..................................................................... 4393
23.6.7 Adding NDB Cluster Data Nodes Online ........................................................ 4394
23.6.8 Online Backup of NDB Cluster ...................................................................... 4404
23.6.9 MySQL Server Usage for NDB Cluster .......................................................... 4410
23.6.10 NDB Cluster Disk Data Tables .................................................................... 4412
23.6.11 Online Operations with ALTER TABLE in NDB Cluster .................................. 4418
23.6.12 Privilege Synchronization and NDB_STORED_USER ................................... 4421
23.6.13 NDB API Statistics Counters and Variables .................................................. 4422
23.6.14 ndbinfo: The NDB Cluster Information Database ........................................... 4434
23.6.15 INFORMATION_SCHEMA Tables for NDB Cluster ....................................... 4511
23.6.16 ndbcluster Plugin Threads ........................................................................... 4511
23.6.17 Quick Reference: NDB Cluster SQL Statements ........................................... 4512
23.6.18 NDB Cluster Security Issues ....................................................................... 4518
23.7 NDB Cluster Replication .......................................................................................... 4525
23.7.1 NDB Cluster Replication: Abbreviations and Symbols ..................................... 4527
23.7.2 General Requirements for NDB Cluster Replication ........................................ 4527
23.7.3 Known Issues in NDB Cluster Replication ...................................................... 4529
23.7.4 NDB Cluster Replication Schema and Tables ................................................. 4535
23.7.5 Preparing the NDB Cluster for Replication ..................................................... 4542
23.7.6 Starting NDB Cluster Replication (Single Replication Channel) ........................ 4544
23.7.7 Using Two Replication Channels for NDB Cluster Replication .......................... 4545
23.7.8 Implementing Failover with NDB Cluster Replication ....................................... 4546
23.7.9 NDB Cluster Backups With NDB Cluster Replication ....................................... 4548
23.7.10 NDB Cluster Replication: Bidirectional and Circular Replication ...................... 4554
23.7.11 NDB Cluster Replication Conflict Resolution ................................................. 4558
23.8 NDB Cluster Release Notes ..................................................................................... 4570
24 Partitioning ......................................................................................................................... 4571
24.1 Overview of Partitioning in MySQL ........................................................................... 4572
24.2 Partitioning Types .................................................................................................... 4575
xx
剩余6073页未读,继续阅读
2022-09-26 上传
2022-04-05 上传
2024-06-17 上传
点击了解资源详情
2022-05-12 上传
2018-10-17 上传
点击了解资源详情
点击了解资源详情
Michael_chemic
- 粉丝: 1166
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功