没有合适的资源?快使用搜索试试~ 我知道了~
首页MySQL 5.7官方文档:特性与NDB Cluster 7.5/7.6详解
MySQL 5.7官方文档:特性与NDB Cluster 7.5/7.6详解
需积分: 14 6 下载量 53 浏览量
更新于2024-07-19
收藏 37.66MB PDF 举报
"MySQL 5.7 Reference Manual 是一个详尽的文档,涵盖了 MySQL 5.7 的所有主要版本,从 5.7.0 到 5.7.20,以及基于 NDB(New Dimensional Database)版本 7.5 的 NDB Cluster 从 5.7.19-ndb-7.5.8 开始的更新。这份文档的重点在于提供 MySQL 5.7 的核心特性和功能,特别是那些可能并非所有用户都能接触到的高级特性,因为这些功能可能因许可协议的不同而有所差异。如果你在使用特定版本的 MySQL 5.7 时对某些功能有疑问,建议查阅你的许可证协议或联系 Oracle 销售代表获取更多信息。
MySQL 5.7 的新特性包括但不限于:
1. 性能优化:MySQL 5.7 引入了多项性能提升,如更快的查询处理、更有效的内存管理、以及对 InnoDB 存储引擎的改进,比如行级锁定和 Flashback 数据恢复功能。
2. 社区和企业版差异:文档明确指出,某些特性可能只存在于企业版中,如高级安全选项、监控工具和高可用性解决方案,这些在社区版中可能不包含。
3. 可扩展性和集群支持:NDB Cluster 版本基于 NDB 7.5,提供了分布式数据库解决方案,适用于大规模并发和复杂的数据模型,有助于提高系统的可用性和可伸缩性。
4. 改进的存储引擎:除了 InnoDB,MyISAM、MEMORY 和 MERGE 等存储引擎也得到了更新,以提升数据处理效率和安全性。
5. 文档更新和资源:对于每个版本的具体变化,可以通过 MySQL 5.7 Release Notes 查阅详细信息。此外,文档还推荐访问 MySQL 论坛和邮件列表,与其他 MySQL 用户交流问题。MySQL 官方文档库提供了更多产品文档,包括多语言翻译版本和不同格式的下载选项,如 HTML 和 PDF。
关于许可信息,文档强调了 MySQL 5.7 的版权和使用条款,确保用户了解并遵守相关规定。在使用 MySQL 5.7 时,请务必阅读和遵守相应的法律通知。
总结来说,MySQL 5.7 Reference Manual 是开发人员、管理员和数据库管理员的重要参考资料,提供了全面的技术指南,帮助用户了解和利用 MySQL 5.7 的最新功能和技术。无论是初学者还是高级用户,都能从中找到所需的信息和支持。"
MySQL 5.7 Reference Manual
xvi
14.18.1 InnoDB Backup ................................................................................................ 2541
14.18.2 InnoDB Recovery ............................................................................................. 2542
14.19 InnoDB and MySQL Replication ................................................................................... 2545
14.20 InnoDB memcached Plugin .......................................................................................... 2547
14.20.1 Benefits of the InnoDB memcached Plugin ........................................................ 2547
14.20.2 InnoDB memcached Architecture ...................................................................... 2548
14.20.3 Setting Up the InnoDB memcached Plugin ........................................................ 2552
14.20.4 Security Considerations for the InnoDB memcached Plugin ................................ 2558
14.20.5 Writing Applications for the InnoDB memcached Plugin ...................................... 2559
14.20.6 The InnoDB memcached Plugin and Replication ................................................ 2572
14.20.7 InnoDB memcached Plugin Internals ................................................................. 2576
14.20.8 Troubleshooting the InnoDB memcached Plugin ................................................ 2581
14.21 InnoDB Troubleshooting .............................................................................................. 2583
14.21.1 Troubleshooting InnoDB I/O Problems ............................................................... 2584
14.21.2 Forcing InnoDB Recovery ................................................................................. 2584
14.21.3 Troubleshooting InnoDB Data Dictionary Operations .......................................... 2586
14.21.4 InnoDB Error Handling ...................................................................................... 2589
15 Alternative Storage Engines ..................................................................................................... 2591
15.1 Setting the Storage Engine ............................................................................................ 2595
15.2 The MyISAM Storage Engine ........................................................................................ 2595
15.2.1 MyISAM Startup Options .................................................................................... 2598
15.2.2 Space Needed for Keys ..................................................................................... 2600
15.2.3 MyISAM Table Storage Formats ......................................................................... 2600
15.2.4 MyISAM Table Problems .................................................................................... 2603
15.3 The MEMORY Storage Engine ...................................................................................... 2604
15.4 The CSV Storage Engine .............................................................................................. 2608
15.4.1 Repairing and Checking CSV Tables .................................................................. 2609
15.4.2 CSV Limitations ................................................................................................. 2610
15.5 The ARCHIVE Storage Engine ...................................................................................... 2610
15.6 The BLACKHOLE Storage Engine ................................................................................. 2611
15.7 The MERGE Storage Engine ......................................................................................... 2614
15.7.1 MERGE Table Advantages and Disadvantages .................................................... 2616
15.7.2 MERGE Table Problems ..................................................................................... 2617
15.8 The FEDERATED Storage Engine ................................................................................. 2619
15.8.1 FEDERATED Storage Engine Overview .............................................................. 2619
15.8.2 How to Create FEDERATED Tables ................................................................... 2620
15.8.3 FEDERATED Storage Engine Notes and Tips ..................................................... 2623
15.8.4 FEDERATED Storage Engine Resources ............................................................ 2624
15.9 The EXAMPLE Storage Engine ..................................................................................... 2625
15.10 Other Storage Engines ................................................................................................ 2625
15.11 Overview of MySQL Storage Engine Architecture ......................................................... 2625
15.11.1 Pluggable Storage Engine Architecture .............................................................. 2626
15.11.2 The Common Database Server Layer ................................................................ 2626
16 Replication ............................................................................................................................... 2629
16.1 Configuring Replication .................................................................................................. 2630
16.1.1 Binary Log File Position Based Replication Configuration Overview ....................... 2631
16.1.2 Setting Up Binary Log File Position Based Replication ......................................... 2631
16.1.3 Replication with Global Transaction Identifiers ..................................................... 2641
16.1.4 MySQL Multi-Source Replication ......................................................................... 2651
16.1.5 Changing Replication Modes on Online Servers ................................................... 2655
16.1.6 Replication and Binary Logging Options and Variables ......................................... 2661
16.1.7 Common Replication Administration Tasks .......................................................... 2753
16.2 Replication Implementation ............................................................................................ 2756
16.2.1 Replication Formats ............................................................................................ 2756
MySQL 5.7 Reference Manual
xvii
16.2.2 Replication Implementation Details ...................................................................... 2764
16.2.3 Replication Channels .......................................................................................... 2765
16.2.4 Replication Relay and Status Logs ...................................................................... 2769
16.2.5 How Servers Evaluate Replication Filtering Rules ................................................ 2775
16.3 Replication Solutions ..................................................................................................... 2781
16.3.1 Using Replication for Backups ............................................................................ 2782
16.3.2 Handling an Unexpected Halt of a Replication Slave ............................................ 2785
16.3.3 Using Replication with Different Master and Slave Storage Engines ...................... 2787
16.3.4 Using Replication for Scale-Out .......................................................................... 2789
16.3.5 Replicating Different Databases to Different Slaves .............................................. 2790
16.3.6 Improving Replication Performance ..................................................................... 2791
16.3.7 Switching Masters During Failover ...................................................................... 2792
16.3.8 Setting Up Replication to Use Secure Connections .............................................. 2794
16.3.9 Semisynchronous Replication ............................................................................. 2796
16.3.10 Delayed Replication .......................................................................................... 2802
16.4 Replication Notes and Tips ............................................................................................ 2802
16.4.1 Replication Features and Issues ......................................................................... 2802
16.4.2 Replication Compatibility Between MySQL Versions ............................................. 2830
16.4.3 Upgrading a Replication Setup ............................................................................ 2831
16.4.4 Troubleshooting Replication ................................................................................ 2832
16.4.5 How to Report Replication Bugs or Problems ...................................................... 2833
17 Group Replication .................................................................................................................... 2835
17.1 Group Replication Background ...................................................................................... 2836
17.1.1 Replication Technologies .................................................................................... 2837
17.1.2 Group Replication Use Cases ............................................................................. 2839
17.1.3 Group Replication Details ................................................................................... 2839
17.2 Getting Started .............................................................................................................. 2841
17.2.1 Deploying Group Replication in Single-Primary Mode ........................................... 2841
17.3 Monitoring Group Replication ......................................................................................... 2851
17.3.1 Replication_group_member_stats ........................................................................ 2851
17.3.2 Replication_group_members ............................................................................... 2852
17.3.3 Replication_connection_status ............................................................................ 2853
17.3.4 Replication_applier_status ................................................................................... 2853
17.3.5 Group Replication Server States ......................................................................... 2853
17.4 Group Replication Operations ........................................................................................ 2854
17.4.1 Deploying in Multi-Primary or Single-Primary Mode .............................................. 2854
17.4.2 Tuning Recovery ................................................................................................ 2856
17.4.3 Network Partitioning ........................................................................................... 2858
17.5 Group Replication Security ............................................................................................ 2863
17.5.1 IP Address Whitelisting ....................................................................................... 2863
17.5.2 Secure Socket Layer Support (SSL) .................................................................... 2863
17.5.3 Virtual Private Networks (VPN) ........................................................................... 2865
17.6 Group Replication System Variables .............................................................................. 2865
17.7 Requirements and Limitations ........................................................................................ 2878
17.7.1 Group Replication Requirements ......................................................................... 2878
17.7.2 Group Replication Limitations .............................................................................. 2879
17.8 Frequently Asked Questions .......................................................................................... 2880
17.9 Group Replication Technical Details ............................................................................... 2883
17.9.1 Group Replication Plugin Architecture ................................................................. 2883
17.9.2 The Group ......................................................................................................... 2885
17.9.3 Data Manipulation Statements ............................................................................ 2885
17.9.4 Data Definition Statements ................................................................................. 2885
17.9.5 Distributed Recovery .......................................................................................... 2886
17.9.6 Observability ...................................................................................................... 2892
MySQL 5.7 Reference Manual
xviii
17.9.7 Group Replication Performance .......................................................................... 2893
18 MySQL Shell User Guide ......................................................................................................... 2897
18.1 MySQL Shell Features .................................................................................................. 2897
18.2 Getting Started with MySQL Shell .................................................................................. 2899
18.2.1 MySQL Shell Sessions ....................................................................................... 2899
18.2.2 MySQL Shell Connections .................................................................................. 2900
18.2.3 MySQL Shell Global Variables ............................................................................ 2904
18.3 MySQL Shell Code Execution ........................................................................................ 2906
18.3.1 Interactive Code Execution ................................................................................. 2906
18.3.2 Batch Code Execution ........................................................................................ 2908
18.3.3 Output Formats .................................................................................................. 2909
18.3.4 Active Language ................................................................................................ 2911
18.3.5 Batch Mode Made Interactive ............................................................................. 2912
18.4 Configuring MySQL Shell .............................................................................................. 2913
18.4.1 MySQL Shell Commands .................................................................................... 2913
18.5 Stored Sessions ............................................................................................................ 2915
18.5.1 MySQL Shell Stored Session Commands ............................................................ 2915
18.5.2 Scripting Stored Sessions ................................................................................... 2916
18.6 MySQL Shell Application Log ........................................................................................ 2918
18.7 Customizing MySQL Shell ............................................................................................. 2919
18.7.1 Working With Start-Up Scripts ............................................................................. 2919
18.7.2 Adding Module Search Paths .............................................................................. 2920
18.7.3 Overriding the Default Prompt ............................................................................. 2921
19 Using MySQL as a Document Store ......................................................................................... 2923
19.1 Preproduction Status — Legal Notice ............................................................................. 2924
19.2 Key Concepts ............................................................................................................... 2924
19.3 Setting Up MySQL as a Document Store ....................................................................... 2925
19.3.1 Installing MySQL Shell ....................................................................................... 2928
19.3.2 Starting MySQL Shell ......................................................................................... 2932
19.4 Quick-Start Guide: MySQL Shell for JavaScript .............................................................. 2932
19.4.1 Introduction ........................................................................................................ 2933
19.4.2 Import Database Sample .................................................................................... 2934
19.4.3 MySQL Shell ...................................................................................................... 2935
19.4.4 Documents and Collections ................................................................................ 2936
19.4.5 Relational Tables ............................................................................................... 2947
19.4.6 Documents in Tables .......................................................................................... 2952
19.5 Quick-Start Guide: MySQL Shell for Python ................................................................... 2953
19.5.1 Introduction ........................................................................................................ 2954
19.5.2 Import Database Sample .................................................................................... 2955
19.5.3 MySQL Shell ...................................................................................................... 2956
19.5.4 Documents and Collections ................................................................................ 2957
19.5.5 Relational Tables ............................................................................................... 2968
19.5.6 Documents in Tables .......................................................................................... 2974
19.6 Quick-Start Guide: MySQL for Visual Studio ................................................................... 2975
19.7 X Plugin ....................................................................................................................... 2976
19.7.1 Using Secure Connections with X Plugin ............................................................. 2977
19.7.2 X Plugin Options and Variables .......................................................................... 2977
19.7.3 Monitoring X Plugin ............................................................................................ 2986
20 InnoDB Cluster ........................................................................................................................ 2991
20.1 Introducing InnoDB Cluster ............................................................................................ 2991
20.2 Installing InnoDB Cluster ............................................................................................... 2993
20.3 Getting Started with InnoDB Cluster ............................................................................... 2993
20.4 Working with InnoDB cluster .......................................................................................... 2998
20.5 Working with a Production Deployment .......................................................................... 3003
MySQL 5.7 Reference Manual
xix
20.6 Creating an InnoDB Cluster From an Existing Group Replication Deployment ................... 3012
20.7 Securing your Cluster .................................................................................................... 3013
20.8 Known Limitations ......................................................................................................... 3014
21 MySQL NDB Cluster 7.5 and NDB Cluster 7.6 .......................................................................... 3017
21.1 NDB Cluster Overview .................................................................................................. 3021
21.1.1 NDB Cluster Core Concepts ............................................................................... 3023
21.1.2 NDB Cluster Nodes, Node Groups, Replicas, and Partitions ................................. 3025
21.1.3 NDB Cluster Hardware, Software, and Networking Requirements .......................... 3028
21.1.4 What is New in MySQL NDB Cluster 7.5 ............................................................. 3030
21.1.5 MySQL Server Using InnoDB Compared with NDB Cluster ................................... 3037
21.1.6 Known Limitations of NDB Cluster ...................................................................... 3040
21.2 NDB Cluster Installation ................................................................................................ 3051
21.2.1 The NDB Cluster Auto-Installer ........................................................................... 3054
21.2.2 Installation of NDB Cluster 7.5 on Linux .............................................................. 3069
21.2.3 Installing NDB Cluster on Windows ..................................................................... 3079
21.2.4 Initial Configuration of NDB Cluster ..................................................................... 3088
21.2.5 Initial Startup of NDB Cluster .............................................................................. 3090
21.2.6 NDB Cluster Example with Tables and Data ........................................................ 3091
21.2.7 Safe Shutdown and Restart of NDB Cluster ......................................................... 3095
21.2.8 Upgrading and Downgrading NDB Cluster ........................................................... 3096
21.3 Configuration of NDB Cluster ......................................................................................... 3097
21.3.1 Quick Test Setup of NDB Cluster ........................................................................ 3098
21.3.2 Overview of NDB Cluster Configuration Parameters, Options, and Variables .......... 3100
21.3.3 NDB Cluster Configuration Files .......................................................................... 3144
21.3.4 Using High-Speed Interconnects with NDB Cluster ............................................... 3284
21.4 NDB Cluster Programs .................................................................................................. 3285
21.4.1 ndbd — The NDB Cluster Data Node Daemon .................................................... 3285
21.4.2 ndbinfo_select_all — Select From ndbinfo Tables ....................................... 3292
21.4.3 ndbmtd — The NDB Cluster Data Node Daemon (Multi-Threaded) ....................... 3294
21.4.4 ndb_mgmd — The NDB Cluster Management Server Daemon .............................. 3295
21.4.5 ndb_mgm — The NDB Cluster Management Client ............................................... 3303
21.4.6 ndb_blob_tool — Check and Repair BLOB and TEXT columns of NDB Cluster
Tables .......................................................................................................................... 3305
21.4.7 ndb_config — Extract NDB Cluster Configuration Information ............................ 3307
21.4.8 ndb_cpcd — Automate Testing for NDB Development ........................................ 3317
21.4.9 ndb_delete_all — Delete All Rows from an NDB Table ................................... 3317
21.4.10 ndb_desc — Describe NDB Tables .................................................................. 3317
21.4.11 ndb_drop_index — Drop Index from an NDB Table ........................................ 3324
21.4.12 ndb_drop_table — Drop an NDB Table ......................................................... 3325
21.4.13 ndb_error_reporter — NDB Error-Reporting Utility ...................................... 3325
21.4.14 ndb_import — Import CSV Data Into NDB ...................................................... 3327
21.4.15 ndb_index_stat — NDB Index Statistics Utility .............................................. 3340
21.4.16 ndb_move_data — NDB Data Copy Utility ....................................................... 3346
21.4.17 ndb_perror — Obtain NDB error message information .................................... 3349
21.4.18 ndb_print_backup_file — Print NDB Backup File Contents ......................... 3351
21.4.19 ndb_print_file — Print NDB Disk Data File Contents ................................... 3351
21.4.20 ndb_print_frag_file — Print NDB Fragment List File Contents .................... 3352
21.4.21 ndb_print_schema_file — Print NDB Schema File Contents ........................ 3353
21.4.22 ndb_print_sys_file — Print NDB System File Contents ............................... 3353
21.4.23 ndb_redo_log_reader — Check and Print Content of Cluster Redo Log .......... 3353
21.4.24 ndb_restore — Restore an NDB Cluster Backup ............................................ 3357
21.4.25 ndb_select_all — Print Rows from an NDB Table ........................................ 3372
21.4.26 ndb_select_count — Print Row Counts for NDB Tables ................................ 3375
21.4.27 ndb_setup.py — Start browser-based Auto-Installer for NDB Cluster ................ 3376
MySQL 5.7 Reference Manual
xx
21.4.28 ndb_show_tables — Display List of NDB Tables ............................................ 3379
21.4.29 ndb_size.pl — NDBCLUSTER Size Requirement Estimator ........................... 3381
21.4.30 ndb_top — View CPU usage information for NDB threads ................................ 3384
21.4.31 ndb_waiter — Wait for NDB Cluster to Reach a Given Status .......................... 3388
21.4.32 Options Common to NDB Cluster Programs — Options Common to NDB Cluster
Programs ...................................................................................................................... 3391
21.5 Management of NDB Cluster ......................................................................................... 3396
21.5.1 Summary of NDB Cluster Start Phases ............................................................... 3397
21.5.2 Commands in the NDB Cluster Management Client ............................................. 3399
21.5.3 Online Backup of NDB Cluster ............................................................................ 3403
21.5.4 MySQL Server Usage for NDB Cluster ................................................................ 3408
21.5.5 Performing a Rolling Restart of an NDB Cluster ................................................... 3409
21.5.6 Event Reports Generated in NDB Cluster ............................................................ 3412
21.5.7 NDB Cluster Log Messages ................................................................................ 3423
21.5.8 NDB Cluster Single User Mode ........................................................................... 3440
21.5.9 Quick Reference: NDB Cluster SQL Statements .................................................. 3441
21.5.10 ndbinfo: The NDB Cluster Information Database ................................................ 3443
21.5.11 INFORMATION_SCHEMA Tables for NDB Cluster ............................................. 3492
21.5.12 NDB Cluster Security Issues ............................................................................. 3493
21.5.13 NDB Cluster Disk Data Tables .......................................................................... 3500
21.5.14 Adding NDB Cluster Data Nodes Online ............................................................ 3506
21.5.15 Distributed MySQL Privileges for NDB Cluster ................................................... 3518
21.5.16 NDB API Statistics Counters and Variables ........................................................ 3521
21.6 NDB Cluster Replication ................................................................................................ 3533
21.6.1 NDB Cluster Replication: Abbreviations and Symbols ........................................... 3534
21.6.2 General Requirements for NDB Cluster Replication .............................................. 3535
21.6.3 Known Issues in NDB Cluster Replication ............................................................ 3536
21.6.4 NDB Cluster Replication Schema and Tables ...................................................... 3543
21.6.5 Preparing the NDB Cluster for Replication ........................................................... 3547
21.6.6 Starting NDB Cluster Replication (Single Replication Channel) .............................. 3549
21.6.7 Using Two Replication Channels for NDB Cluster Replication ............................... 3550
21.6.8 Implementing Failover with NDB Cluster Replication ............................................ 3551
21.6.9 NDB Cluster Backups With NDB Cluster Replication ............................................ 3553
21.6.10 NDB Cluster Replication: Multi-Master and Circular Replication ........................... 3559
21.6.11 NDB Cluster Replication Conflict Resolution ...................................................... 3563
21.7 NDB Cluster Release Notes .......................................................................................... 3577
22 Partitioning .............................................................................................................................. 3579
22.1 Overview of Partitioning in MySQL ................................................................................. 3581
22.2 Partitioning Types ......................................................................................................... 3584
22.2.1 RANGE Partitioning ............................................................................................ 3586
22.2.2 LIST Partitioning ................................................................................................. 3591
22.2.3 COLUMNS Partitioning ....................................................................................... 3593
22.2.4 HASH Partitioning .............................................................................................. 3601
22.2.5 KEY Partitioning ................................................................................................. 3605
22.2.6 Subpartitioning ................................................................................................... 3606
22.2.7 How MySQL Partitioning Handles NULL .............................................................. 3610
22.3 Partition Management ................................................................................................... 3614
22.3.1 Management of RANGE and LIST Partitions ........................................................ 3615
22.3.2 Management of HASH and KEY Partitions .......................................................... 3622
22.3.3 Exchanging Partitions and Subpartitions with Tables ............................................ 3623
22.3.4 Maintenance of Partitions ................................................................................... 3631
22.3.5 Obtaining Information About Partitions ................................................................. 3632
22.4 Partition Pruning ........................................................................................................... 3634
22.5 Partition Selection ......................................................................................................... 3638
剩余5289页未读,继续阅读
2018-11-02 上传
2023-03-07 上传
2023-03-16 上传
2023-04-01 上传
2023-08-13 上传
2023-04-02 上传
2023-06-03 上传
2023-04-04 上传
Jabin_Zhang
- 粉丝: 6
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 多模态联合稀疏表示在视频目标跟踪中的应用
- Kubernetes资源管控与Gardener开源软件实践解析
- MPI集群监控与负载平衡策略
- 自动化PHP安全漏洞检测:静态代码分析与数据流方法
- 青苔数据CEO程永:技术生态与阿里云开放创新
- 制造业转型: HyperX引领企业上云策略
- 赵维五分享:航空工业电子采购上云实战与运维策略
- 单片机控制的LED点阵显示屏设计及其实现
- 驻云科技李俊涛:AI驱动的云上服务新趋势与挑战
- 6LoWPAN物联网边界路由器:设计与实现
- 猩便利工程师仲小玉:Terraform云资源管理最佳实践与团队协作
- 类差分度改进的互信息特征选择提升文本分类性能
- VERITAS与阿里云合作的混合云转型与数据保护方案
- 云制造中的生产线仿真模型设计与虚拟化研究
- 汪洋在PostgresChina2018分享:高可用 PostgreSQL 工具与架构设计
- 2018 PostgresChina大会:阿里云时空引擎Ganos在PostgreSQL中的创新应用与多模型存储
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功