没有合适的资源?快使用搜索试试~ 我知道了~
首页MySQL 5.7官方参考手册:涵盖NDB Cluster 7.5和7.6
MySQL 5.7官方参考手册:涵盖NDB Cluster 7.5和7.6
需积分: 9 3 下载量 49 浏览量
更新于2024-07-19
收藏 38.13MB PDF 举报
"MySQL5.7用户手册-英文版,包含了MySQL NDB Cluster 7.5和7.6的相关内容"
MySQL 5.7是这款数据库管理系统的一个重要版本,提供了丰富的功能和性能提升。本参考手册详细阐述了从5.7.0到5.7.22的所有版本特性,同时涵盖了基于NDB 7.5版本的NDB Cluster 7.5.9至5.7.20-ndb-7.5.9的集群信息。NDB Cluster是MySQL的一种分布式存储引擎,强调高可用性和数据复制。
在MySQL 5.7中,有几个显著的特点值得注意:
1. **InnoDB存储引擎增强**:InnoDB作为MySQL的默认存储引擎,5.7版本进行了大量优化,包括更快的插入速度、更高的并发性能以及对事务处理的改进。例如,支持多线程插入缓冲区(MTS),提高了插入操作的并行性。
2. **Performance Schema增强**:MySQL 5.7提供了更强大的性能监控和分析工具,Performance Schema能够收集关于系统资源使用的详细信息,帮助管理员诊断和优化性能问题。
3. **JSON支持**:MySQL 5.7引入了对JSON数据类型的原生支持,允许在关系型数据库中存储和查询非结构化数据,适应NoSQL潮流。
4. **Window Functions**:这个版本引入了窗口函数,使得在SQL查询中进行复杂的数据分析和计算变得更加容易。
5. **Dynamic Columns**:动态列允许在一个记录中存储多个值,而无需创建额外的表或字段,这在处理元数据或者日志记录等场景中非常有用。
6. **Row-Based Replication Enhancements**:复制机制得到增强,提供更灵活的复制选项,如GTID(Global Transaction Identifier)自动跟踪和管理,增强了复制的可靠性。
7. **Security增强**:MySQL 5.7改进了安全功能,如加强了默认的安全设置,提供更安全的认证方法,如使用SSL/TLS加密连接,以及改进了权限管理。
8. **Query Optimizer改进**:优化器现在能更智能地选择执行计划,通过改进的统计信息和更精确的成本估算来提高查询性能。
9. **Memory Management优化**:内存管理得到优化,减少了内存碎片和提高了内存利用率。
值得注意的是,不同版本的MySQL 5.7可能包含不同的特性,某些高级功能可能只在特定的商业版中提供。如果你不确定自己的许可证是否包含某个特性,应查阅你的MySQL 5.7许可协议或咨询Oracle的销售代表。
对于每个版本的更新和变更,可以查看MySQL 5.7的发行说明,以获取详细信息。此外,手册还提供了法律条款,并提供了在线论坛和邮件列表,用户可以在这些平台上与其他MySQL用户讨论问题。若需更多MySQL产品的文档,包括其他语言的翻译版本和各种格式的下载版本(如HTML和PDF),可以访问MySQL文档库。
最后,关于MySQL 5.7的授权信息,建议仔细阅读相关条款,确保合规使用。
MySQL 5.7 Reference Manual
xvi
14.18 InnoDB Backup and Recovery ..................................................................................... 2594
14.18.1 InnoDB Backup ................................................................................................ 2594
14.18.2 InnoDB Recovery ............................................................................................. 2595
14.19 InnoDB and MySQL Replication ................................................................................... 2598
14.20 InnoDB memcached Plugin .......................................................................................... 2600
14.20.1 Benefits of the InnoDB memcached Plugin ........................................................ 2600
14.20.2 InnoDB memcached Architecture ...................................................................... 2601
14.20.3 Setting Up the InnoDB memcached Plugin ........................................................ 2605
14.20.4 Security Considerations for the InnoDB memcached Plugin ................................ 2611
14.20.5 Writing Applications for the InnoDB memcached Plugin ...................................... 2613
14.20.6 The InnoDB memcached Plugin and Replication ................................................ 2626
14.20.7 InnoDB memcached Plugin Internals ................................................................. 2629
14.20.8 Troubleshooting the InnoDB memcached Plugin ................................................ 2634
14.21 InnoDB Troubleshooting .............................................................................................. 2636
14.21.1 Troubleshooting InnoDB I/O Problems ............................................................... 2637
14.21.2 Forcing InnoDB Recovery ................................................................................. 2637
14.21.3 Troubleshooting InnoDB Data Dictionary Operations .......................................... 2639
14.21.4 InnoDB Error Handling ...................................................................................... 2643
15 Alternative Storage Engines ..................................................................................................... 2645
15.1 Setting the Storage Engine ............................................................................................ 2649
15.2 The MyISAM Storage Engine ........................................................................................ 2649
15.2.1 MyISAM Startup Options .................................................................................... 2652
15.2.2 Space Needed for Keys ..................................................................................... 2653
15.2.3 MyISAM Table Storage Formats ......................................................................... 2654
15.2.4 MyISAM Table Problems .................................................................................... 2656
15.3 The MEMORY Storage Engine ...................................................................................... 2658
15.4 The CSV Storage Engine .............................................................................................. 2662
15.4.1 Repairing and Checking CSV Tables .................................................................. 2663
15.4.2 CSV Limitations ................................................................................................. 2664
15.5 The ARCHIVE Storage Engine ...................................................................................... 2664
15.6 The BLACKHOLE Storage Engine ................................................................................. 2665
15.7 The MERGE Storage Engine ......................................................................................... 2668
15.7.1 MERGE Table Advantages and Disadvantages .................................................... 2670
15.7.2 MERGE Table Problems ..................................................................................... 2671
15.8 The FEDERATED Storage Engine ................................................................................. 2673
15.8.1 FEDERATED Storage Engine Overview .............................................................. 2673
15.8.2 How to Create FEDERATED Tables ................................................................... 2674
15.8.3 FEDERATED Storage Engine Notes and Tips ..................................................... 2677
15.8.4 FEDERATED Storage Engine Resources ............................................................ 2679
15.9 The EXAMPLE Storage Engine ..................................................................................... 2679
15.10 Other Storage Engines ................................................................................................ 2679
15.11 Overview of MySQL Storage Engine Architecture ......................................................... 2679
15.11.1 Pluggable Storage Engine Architecture .............................................................. 2680
15.11.2 The Common Database Server Layer ................................................................ 2680
16 Replication ............................................................................................................................... 2683
16.1 Configuring Replication .................................................................................................. 2684
16.1.1 Binary Log File Position Based Replication Configuration Overview ....................... 2685
16.1.2 Setting Up Binary Log File Position Based Replication ......................................... 2685
16.1.3 Replication with Global Transaction Identifiers ..................................................... 2695
16.1.4 MySQL Multi-Source Replication ......................................................................... 2705
16.1.5 Changing Replication Modes on Online Servers ................................................... 2709
16.1.6 Replication and Binary Logging Options and Variables ......................................... 2715
16.1.7 Common Replication Administration Tasks .......................................................... 2801
16.2 Replication Implementation ............................................................................................ 2804
MySQL 5.7 Reference Manual
xvii
16.2.1 Replication Formats ............................................................................................ 2805
16.2.2 Replication Implementation Details ...................................................................... 2812
16.2.3 Replication Channels .......................................................................................... 2814
16.2.4 Replication Relay and Status Logs ...................................................................... 2817
16.2.5 How Servers Evaluate Replication Filtering Rules ................................................ 2824
16.3 Replication Solutions ..................................................................................................... 2831
16.3.1 Using Replication for Backups ............................................................................ 2831
16.3.2 Handling an Unexpected Halt of a Replication Slave ............................................ 2835
16.3.3 Using Replication with Different Master and Slave Storage Engines ...................... 2837
16.3.4 Using Replication for Scale-Out .......................................................................... 2838
16.3.5 Replicating Different Databases to Different Slaves .............................................. 2840
16.3.6 Improving Replication Performance ..................................................................... 2841
16.3.7 Switching Masters During Failover ...................................................................... 2842
16.3.8 Setting Up Replication to Use Encrypted Connections .......................................... 2844
16.3.9 Semisynchronous Replication ............................................................................. 2846
16.3.10 Delayed Replication .......................................................................................... 2852
16.4 Replication Notes and Tips ............................................................................................ 2852
16.4.1 Replication Features and Issues ......................................................................... 2852
16.4.2 Replication Compatibility Between MySQL Versions ............................................. 2880
16.4.3 Upgrading a Replication Setup ............................................................................ 2881
16.4.4 Troubleshooting Replication ................................................................................ 2882
16.4.5 How to Report Replication Bugs or Problems ...................................................... 2883
17 Group Replication .................................................................................................................... 2885
17.1 Group Replication Background ...................................................................................... 2886
17.1.1 Replication Technologies .................................................................................... 2887
17.1.2 Group Replication Use Cases ............................................................................. 2889
17.1.3 Group Replication Details ................................................................................... 2889
17.2 Getting Started .............................................................................................................. 2891
17.2.1 Deploying Group Replication in Single-Primary Mode ........................................... 2891
17.3 Monitoring Group Replication ......................................................................................... 2901
17.3.1 Replication_group_member_stats ........................................................................ 2902
17.3.2 Replication_group_members ............................................................................... 2903
17.3.3 Replication_connection_status ............................................................................ 2903
17.3.4 Replication_applier_status ................................................................................... 2903
17.3.5 Group Replication Server States ......................................................................... 2904
17.4 Group Replication Operations ........................................................................................ 2905
17.4.1 Deploying in Multi-Primary or Single-Primary Mode .............................................. 2905
17.4.2 Tuning Recovery ................................................................................................ 2907
17.4.3 Network Partitioning ........................................................................................... 2908
17.4.4 Using MySQL Enterprise Backup with Group Replication ...................................... 2914
17.5 Group Replication Security ............................................................................................ 2915
17.5.1 IP Address Whitelisting ....................................................................................... 2916
17.5.2 Secure Socket Layer Support (SSL) .................................................................... 2916
17.5.3 Virtual Private Networks (VPN) ........................................................................... 2918
17.6 Group Replication System Variables .............................................................................. 2918
17.7 Requirements and Limitations ........................................................................................ 2930
17.7.1 Group Replication Requirements ......................................................................... 2930
17.7.2 Group Replication Limitations .............................................................................. 2931
17.8 Frequently Asked Questions .......................................................................................... 2932
17.9 Group Replication Technical Details ............................................................................... 2936
17.9.1 Group Replication Plugin Architecture ................................................................. 2936
17.9.2 The Group ......................................................................................................... 2938
17.9.3 Data Manipulation Statements ............................................................................ 2938
17.9.4 Data Definition Statements ................................................................................. 2938
MySQL 5.7 Reference Manual
xviii
17.9.5 Distributed Recovery .......................................................................................... 2939
17.9.6 Observability ...................................................................................................... 2945
17.9.7 Group Replication Performance .......................................................................... 2946
18 MySQL Shell User Guide ......................................................................................................... 2951
18.1 MySQL Shell Features .................................................................................................. 2951
18.2 Getting Started with MySQL Shell .................................................................................. 2953
18.2.1 MySQL Shell Connections .................................................................................. 2953
18.2.2 MySQL Shell Sessions ....................................................................................... 2958
18.2.3 MySQL Shell Global Variables ............................................................................ 2959
18.3 MySQL Shell Code Execution ........................................................................................ 2961
18.3.1 Interactive Code Execution ................................................................................. 2961
18.3.2 Batch Code Execution ........................................................................................ 2963
18.3.3 Output Formats .................................................................................................. 2964
18.3.4 Active Language ................................................................................................ 2966
18.3.5 Batch Mode Made Interactive ............................................................................. 2967
18.4 Configuring MySQL Shell .............................................................................................. 2968
18.4.1 MySQL Shell Commands .................................................................................... 2968
18.5 MySQL Shell Application Log ........................................................................................ 2970
18.6 Customizing MySQL Shell ............................................................................................. 2971
18.6.1 Working With Start-Up Scripts ............................................................................. 2971
18.6.2 Adding Module Search Paths .............................................................................. 2972
18.6.3 Overriding the Default Prompt ............................................................................. 2973
19 Using MySQL as a Document Store ......................................................................................... 2975
19.1 Preproduction Status — Legal Notice ............................................................................. 2976
19.2 Key Concepts ............................................................................................................... 2976
19.3 Setting Up MySQL as a Document Store ....................................................................... 2977
19.3.1 Installing MySQL Shell ....................................................................................... 2980
19.3.2 Starting MySQL Shell ......................................................................................... 2984
19.4 Quick-Start Guide: MySQL Shell for JavaScript .............................................................. 2984
19.4.1 Introduction ........................................................................................................ 2985
19.4.2 Import Database Sample .................................................................................... 2986
19.4.3 MySQL Shell ...................................................................................................... 2987
19.4.4 Documents and Collections ................................................................................ 2988
19.4.5 Relational Tables ............................................................................................... 2999
19.4.6 Documents in Tables .......................................................................................... 3005
19.5 Quick-Start Guide: MySQL Shell for Python ................................................................... 3006
19.5.1 Introduction ........................................................................................................ 3006
19.5.2 Import Database Sample .................................................................................... 3007
19.5.3 MySQL Shell ...................................................................................................... 3008
19.5.4 Documents and Collections ................................................................................ 3009
19.5.5 Relational Tables ............................................................................................... 3020
19.5.6 Documents in Tables .......................................................................................... 3026
19.6 Quick-Start Guide: MySQL for Visual Studio ................................................................... 3027
19.7 X Plugin ....................................................................................................................... 3028
19.7.1 Using Secure Connections with X Plugin ............................................................. 3029
19.7.2 X Plugin Options and Variables .......................................................................... 3029
19.7.3 Monitoring X Plugin ............................................................................................ 3040
20 InnoDB Cluster ........................................................................................................................ 3045
20.1 Introducing InnoDB Cluster ............................................................................................ 3045
20.2 Creating an InnoDB Cluster ........................................................................................... 3047
20.2.1 Deployment Scenarios ........................................................................................ 3047
20.2.2 InnoDB Cluster Requirements ............................................................................. 3048
20.2.3 Methods of Installing .......................................................................................... 3048
20.2.4 Sandbox Deployment of InnoDB Cluster .............................................................. 3049
MySQL 5.7 Reference Manual
xix
20.2.5 Production Deployment of InnoDB Cluster ........................................................... 3052
20.2.6 Adopting a Group Replication Deployment ........................................................... 3060
20.3 Using MySQL Router with InnoDB Cluster ..................................................................... 3061
20.4 Working with InnoDB Cluster ......................................................................................... 3064
20.5 Known Limitations ......................................................................................................... 3074
21 MySQL NDB Cluster 7.5 and NDB Cluster 7.6 .......................................................................... 3077
21.1 NDB Cluster Overview .................................................................................................. 3081
21.1.1 NDB Cluster Core Concepts ............................................................................... 3083
21.1.2 NDB Cluster Nodes, Node Groups, Replicas, and Partitions ................................. 3085
21.1.3 NDB Cluster Hardware, Software, and Networking Requirements .......................... 3088
21.1.4 What is New in NDB Cluster ............................................................................... 3090
21.1.5 MySQL Server Using InnoDB Compared with NDB Cluster ................................... 3101
21.1.6 Known Limitations of NDB Cluster ...................................................................... 3104
21.2 NDB Cluster Installation ................................................................................................ 3115
21.2.1 The NDB Cluster Auto-Installer ........................................................................... 3118
21.2.2 Installation of NDB Cluster on Linux .................................................................... 3133
21.2.3 Installing NDB Cluster on Windows ..................................................................... 3143
21.2.4 Initial Configuration of NDB Cluster ..................................................................... 3152
21.2.5 Initial Startup of NDB Cluster .............................................................................. 3154
21.2.6 NDB Cluster Example with Tables and Data ........................................................ 3155
21.2.7 Safe Shutdown and Restart of NDB Cluster ......................................................... 3159
21.2.8 Upgrading and Downgrading NDB Cluster ........................................................... 3160
21.3 Configuration of NDB Cluster ......................................................................................... 3162
21.3.1 Quick Test Setup of NDB Cluster ........................................................................ 3162
21.3.2 Overview of NDB Cluster Configuration Parameters, Options, and Variables .......... 3165
21.3.3 NDB Cluster Configuration Files .......................................................................... 3209
21.3.4 Using High-Speed Interconnects with NDB Cluster ............................................... 3353
21.4 NDB Cluster Programs .................................................................................................. 3354
21.4.1 ndbd — The NDB Cluster Data Node Daemon .................................................... 3354
21.4.2 ndbinfo_select_all — Select From ndbinfo Tables ....................................... 3361
21.4.3 ndbmtd — The NDB Cluster Data Node Daemon (Multi-Threaded) ....................... 3363
21.4.4 ndb_mgmd — The NDB Cluster Management Server Daemon .............................. 3364
21.4.5 ndb_mgm — The NDB Cluster Management Client ............................................... 3372
21.4.6 ndb_blob_tool — Check and Repair BLOB and TEXT columns of NDB Cluster
Tables .......................................................................................................................... 3374
21.4.7 ndb_config — Extract NDB Cluster Configuration Information ............................ 3376
21.4.8 ndb_cpcd — Automate Testing for NDB Development ........................................ 3385
21.4.9 ndb_delete_all — Delete All Rows from an NDB Table ................................... 3385
21.4.10 ndb_desc — Describe NDB Tables .................................................................. 3386
21.4.11 ndb_drop_index — Drop Index from an NDB Table ........................................ 3392
21.4.12 ndb_drop_table — Drop an NDB Table ......................................................... 3393
21.4.13 ndb_error_reporter — NDB Error-Reporting Utility ...................................... 3394
21.4.14 ndb_import — Import CSV Data Into NDB ...................................................... 3395
21.4.15 ndb_index_stat — NDB Index Statistics Utility .............................................. 3408
21.4.16 ndb_move_data — NDB Data Copy Utility ....................................................... 3413
21.4.17 ndb_perror — Obtain NDB error message information .................................... 3416
21.4.18 ndb_print_backup_file — Print NDB Backup File Contents ......................... 3418
21.4.19 ndb_print_file — Print NDB Disk Data File Contents ................................... 3418
21.4.20 ndb_print_frag_file — Print NDB Fragment List File Contents .................... 3419
21.4.21 ndb_print_schema_file — Print NDB Schema File Contents ........................ 3420
21.4.22 ndb_print_sys_file — Print NDB System File Contents ............................... 3420
21.4.23 ndb_redo_log_reader — Check and Print Content of Cluster Redo Log .......... 3420
21.4.24 ndb_restore — Restore an NDB Cluster Backup ............................................ 3423
21.4.25 ndb_select_all — Print Rows from an NDB Table ........................................ 3443
MySQL 5.7 Reference Manual
xx
21.4.26 ndb_select_count — Print Row Counts for NDB Tables ................................ 3447
21.4.27 ndb_setup.py — Start browser-based Auto-Installer for NDB Cluster ................ 3447
21.4.28 ndb_show_tables — Display List of NDB Tables ............................................ 3451
21.4.29 ndb_size.pl — NDBCLUSTER Size Requirement Estimator ........................... 3452
21.4.30 ndb_top — View CPU usage information for NDB threads ................................ 3455
21.4.31 ndb_waiter — Wait for NDB Cluster to Reach a Given Status .......................... 3460
21.4.32 Options Common to NDB Cluster Programs — Options Common to NDB Cluster
Programs ...................................................................................................................... 3463
21.5 Management of NDB Cluster ......................................................................................... 3468
21.5.1 Summary of NDB Cluster Start Phases ............................................................... 3469
21.5.2 Commands in the NDB Cluster Management Client ............................................. 3470
21.5.3 Online Backup of NDB Cluster ............................................................................ 3475
21.5.4 MySQL Server Usage for NDB Cluster ................................................................ 3479
21.5.5 Performing a Rolling Restart of an NDB Cluster ................................................... 3481
21.5.6 Event Reports Generated in NDB Cluster ............................................................ 3483
21.5.7 NDB Cluster Log Messages ................................................................................ 3494
21.5.8 NDB Cluster Single User Mode ........................................................................... 3511
21.5.9 Quick Reference: NDB Cluster SQL Statements .................................................. 3512
21.5.10 ndbinfo: The NDB Cluster Information Database ................................................ 3514
21.5.11 INFORMATION_SCHEMA Tables for NDB Cluster ............................................. 3565
21.5.12 NDB Cluster Security Issues ............................................................................. 3566
21.5.13 NDB Cluster Disk Data Tables .......................................................................... 3573
21.5.14 Adding NDB Cluster Data Nodes Online ............................................................ 3581
21.5.15 Distributed MySQL Privileges for NDB Cluster ................................................... 3592
21.5.16 NDB API Statistics Counters and Variables ........................................................ 3596
21.6 NDB Cluster Replication ................................................................................................ 3608
21.6.1 NDB Cluster Replication: Abbreviations and Symbols ........................................... 3609
21.6.2 General Requirements for NDB Cluster Replication .............................................. 3610
21.6.3 Known Issues in NDB Cluster Replication ............................................................ 3611
21.6.4 NDB Cluster Replication Schema and Tables ...................................................... 3618
21.6.5 Preparing the NDB Cluster for Replication ........................................................... 3622
21.6.6 Starting NDB Cluster Replication (Single Replication Channel) .............................. 3624
21.6.7 Using Two Replication Channels for NDB Cluster Replication ............................... 3625
21.6.8 Implementing Failover with NDB Cluster Replication ............................................ 3626
21.6.9 NDB Cluster Backups With NDB Cluster Replication ............................................ 3628
21.6.10 NDB Cluster Replication: Multi-Master and Circular Replication ........................... 3634
21.6.11 NDB Cluster Replication Conflict Resolution ...................................................... 3638
21.7 NDB Cluster Release Notes .......................................................................................... 3652
22 Partitioning .............................................................................................................................. 3653
22.1 Overview of Partitioning in MySQL ................................................................................. 3655
22.2 Partitioning Types ......................................................................................................... 3658
22.2.1 RANGE Partitioning ............................................................................................ 3660
22.2.2 LIST Partitioning ................................................................................................. 3665
22.2.3 COLUMNS Partitioning ....................................................................................... 3667
22.2.4 HASH Partitioning .............................................................................................. 3675
22.2.5 KEY Partitioning ................................................................................................. 3679
22.2.6 Subpartitioning ................................................................................................... 3680
22.2.7 How MySQL Partitioning Handles NULL .............................................................. 3684
22.3 Partition Management ................................................................................................... 3688
22.3.1 Management of RANGE and LIST Partitions ........................................................ 3689
22.3.2 Management of HASH and KEY Partitions .......................................................... 3696
22.3.3 Exchanging Partitions and Subpartitions with Tables ............................................ 3697
22.3.4 Maintenance of Partitions ................................................................................... 3705
22.3.5 Obtaining Information About Partitions ................................................................. 3706
剩余5373页未读,继续阅读
2020-10-20 上传
2018-08-16 上传
2018-08-07 上传
2021-04-28 上传
2018-10-03 上传
2018-11-08 上传
todayisv
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 俄罗斯RTSD数据集实现交通标志实时检测
- 易语言开发的文件批量改名工具使用Ex_Dui美化界面
- 爱心援助动态网页教程:前端开发实战指南
- 复旦微电子数字电路课件4章同步时序电路详解
- Dylan Manley的编程投资组合登录页面设计介绍
- Python实现H3K4me3与H3K27ac表观遗传标记域长度分析
- 易语言开源播放器项目:简易界面与强大的音频支持
- 介绍rxtx2.2全系统环境下的Java版本使用
- ZStack-CC2530 半开源协议栈使用与安装指南
- 易语言实现的八斗平台与淘宝评论采集软件开发
- Christiano响应式网站项目设计与技术特点
- QT图形框架中QGraphicRectItem的插入与缩放技术
- 组合逻辑电路深入解析与习题教程
- Vue+ECharts实现中国地图3D展示与交互功能
- MiSTer_MAME_SCRIPTS:自动下载MAME与HBMAME脚本指南
- 前端技术精髓:构建响应式盆栽展示网站
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功