没有合适的资源?快使用搜索试试~ 我知道了~
首页MySQL 5.7官方手册:新特性与NDBCluster 7.5/7.6详解
MySQL 5.7官方手册:新特性与NDBCluster 7.5/7.6详解
需积分: 8 2 下载量 191 浏览量
更新于2024-07-19
收藏 38.38MB PDF 举报
"MySQL 5.7官方手册是MySQL官方于2018年2月发布的最新文档,涵盖了MySQL 5.7系列的版本5.7.0至5.7.22,以及基于NDB Cluster 7.5的相应版本。该手册详细介绍了MySQL 5.7的主要特性和功能,这些特性可能并非所有版本都包含,用户应参考自己的授权协议了解具体涵盖内容。
MySQL 5.7作为一款多线程的SQL数据库服务器,其显著特点是执行性能高、运行速度快且易于使用,这使得它在全球范围内广受欢迎。手册中特别强调了那些在不同版本中有所差异的高级功能,如果用户对所使用的MySQL 5.7版本的特性有疑问,应查阅相关许可证协议或联系Oracle的销售代表获取更多信息。
手册还提供了关于每个版本更新的详细变化记录,用户可以通过MySQL 5.7 Release Notes获取这部分内容。对于法律条款,用户需要查看Legal Notices部分,以确保理解和遵守相关规定。
在遇到MySQL使用问题时,手册建议用户前往MySQL论坛或邮件列表进行讨论,与其他MySQL用户交流解决方案。此外,MySQL产品还提供了丰富的额外文档,包括翻译成多种语言的版本和可供下载的不同格式(如HTML和PDF),用户可以在MySQL Documentation Library中找到这些资源。
最后,手册提供了关于MySQL 5.7的许可证信息,这是理解如何合法使用和授权的重要部分。MySQL 5.7官方手册是开发者和管理员深入了解和掌握MySQL 5.7的核心工具,无论是初次接触还是深入研究,都是不可或缺的参考资料。"
![](https://csdnimg.cn/release/download_crawler_static/10239065/bg10.jpg)
MySQL 5.7 Reference Manual
xvi
14.17.3 InnoDB Standard Monitor and Lock Monitor Output ............................................ 2626
14.18 InnoDB Backup and Recovery ..................................................................................... 2632
14.18.1 InnoDB Backup ................................................................................................ 2632
14.18.2 InnoDB Recovery ............................................................................................. 2633
14.19 InnoDB and MySQL Replication ................................................................................... 2636
14.20 InnoDB memcached Plugin .......................................................................................... 2638
14.20.1 Benefits of the InnoDB memcached Plugin ........................................................ 2638
14.20.2 InnoDB memcached Architecture ...................................................................... 2639
14.20.3 Setting Up the InnoDB memcached Plugin ........................................................ 2643
14.20.4 Security Considerations for the InnoDB memcached Plugin ................................ 2649
14.20.5 Writing Applications for the InnoDB memcached Plugin ...................................... 2651
14.20.6 The InnoDB memcached Plugin and Replication ................................................ 2664
14.20.7 InnoDB memcached Plugin Internals ................................................................. 2668
14.20.8 Troubleshooting the InnoDB memcached Plugin ................................................ 2672
14.21 InnoDB Troubleshooting .............................................................................................. 2674
14.21.1 Troubleshooting InnoDB I/O Problems ............................................................... 2675
14.21.2 Forcing InnoDB Recovery ................................................................................. 2676
14.21.3 Troubleshooting InnoDB Data Dictionary Operations .......................................... 2677
14.21.4 InnoDB Error Handling ...................................................................................... 2681
15 Alternative Storage Engines ..................................................................................................... 2683
15.1 Setting the Storage Engine ............................................................................................ 2687
15.2 The MyISAM Storage Engine ........................................................................................ 2687
15.2.1 MyISAM Startup Options .................................................................................... 2690
15.2.2 Space Needed for Keys ..................................................................................... 2691
15.2.3 MyISAM Table Storage Formats ......................................................................... 2692
15.2.4 MyISAM Table Problems .................................................................................... 2694
15.3 The MEMORY Storage Engine ...................................................................................... 2696
15.4 The CSV Storage Engine .............................................................................................. 2700
15.4.1 Repairing and Checking CSV Tables .................................................................. 2701
15.4.2 CSV Limitations ................................................................................................. 2702
15.5 The ARCHIVE Storage Engine ...................................................................................... 2702
15.6 The BLACKHOLE Storage Engine ................................................................................. 2703
15.7 The MERGE Storage Engine ......................................................................................... 2706
15.7.1 MERGE Table Advantages and Disadvantages .................................................... 2708
15.7.2 MERGE Table Problems ..................................................................................... 2709
15.8 The FEDERATED Storage Engine ................................................................................. 2711
15.8.1 FEDERATED Storage Engine Overview .............................................................. 2711
15.8.2 How to Create FEDERATED Tables ................................................................... 2712
15.8.3 FEDERATED Storage Engine Notes and Tips ..................................................... 2715
15.8.4 FEDERATED Storage Engine Resources ............................................................ 2717
15.9 The EXAMPLE Storage Engine ..................................................................................... 2717
15.10 Other Storage Engines ................................................................................................ 2717
15.11 Overview of MySQL Storage Engine Architecture ......................................................... 2717
15.11.1 Pluggable Storage Engine Architecture .............................................................. 2718
15.11.2 The Common Database Server Layer ................................................................ 2718
16 Replication ............................................................................................................................... 2721
16.1 Configuring Replication .................................................................................................. 2722
16.1.1 Binary Log File Position Based Replication Configuration Overview ....................... 2723
16.1.2 Setting Up Binary Log File Position Based Replication ......................................... 2723
16.1.3 Replication with Global Transaction Identifiers ..................................................... 2733
16.1.4 MySQL Multi-Source Replication ......................................................................... 2743
16.1.5 Changing Replication Modes on Online Servers ................................................... 2747
16.1.6 Replication and Binary Logging Options and Variables ......................................... 2753
16.1.7 Common Replication Administration Tasks .......................................................... 2840
![](https://csdnimg.cn/release/download_crawler_static/10239065/bg11.jpg)
MySQL 5.7 Reference Manual
xvii
16.2 Replication Implementation ............................................................................................ 2843
16.2.1 Replication Formats ............................................................................................ 2844
16.2.2 Replication Implementation Details ...................................................................... 2851
16.2.3 Replication Channels .......................................................................................... 2853
16.2.4 Replication Relay and Status Logs ...................................................................... 2856
16.2.5 How Servers Evaluate Replication Filtering Rules ................................................ 2863
16.3 Replication Solutions ..................................................................................................... 2870
16.3.1 Using Replication for Backups ............................................................................ 2870
16.3.2 Handling an Unexpected Halt of a Replication Slave ............................................ 2874
16.3.3 Using Replication with Different Master and Slave Storage Engines ...................... 2876
16.3.4 Using Replication for Scale-Out .......................................................................... 2877
16.3.5 Replicating Different Databases to Different Slaves .............................................. 2879
16.3.6 Improving Replication Performance ..................................................................... 2880
16.3.7 Switching Masters During Failover ...................................................................... 2881
16.3.8 Setting Up Replication to Use Encrypted Connections .......................................... 2883
16.3.9 Semisynchronous Replication ............................................................................. 2885
16.3.10 Delayed Replication .......................................................................................... 2891
16.4 Replication Notes and Tips ............................................................................................ 2891
16.4.1 Replication Features and Issues ......................................................................... 2891
16.4.2 Replication Compatibility Between MySQL Versions ............................................. 2919
16.4.3 Upgrading a Replication Setup ............................................................................ 2920
16.4.4 Troubleshooting Replication ................................................................................ 2922
16.4.5 How to Report Replication Bugs or Problems ...................................................... 2923
17 Group Replication .................................................................................................................... 2925
17.1 Group Replication Background ...................................................................................... 2926
17.1.1 Replication Technologies .................................................................................... 2927
17.1.2 Group Replication Use Cases ............................................................................. 2929
17.1.3 Group Replication Details ................................................................................... 2929
17.2 Getting Started .............................................................................................................. 2931
17.2.1 Deploying Group Replication in Single-Primary Mode ........................................... 2931
17.3 Monitoring Group Replication ......................................................................................... 2941
17.3.1 Replication_group_member_stats ........................................................................ 2942
17.3.2 Replication_group_members ............................................................................... 2943
17.3.3 Replication_connection_status ............................................................................ 2943
17.3.4 Replication_applier_status ................................................................................... 2943
17.3.5 Group Replication Server States ......................................................................... 2944
17.4 Group Replication Operations ........................................................................................ 2945
17.4.1 Deploying in Multi-Primary or Single-Primary Mode .............................................. 2945
17.4.2 Tuning Recovery ................................................................................................ 2947
17.4.3 Network Partitioning ........................................................................................... 2948
17.4.4 Using MySQL Enterprise Backup with Group Replication ...................................... 2954
17.5 Group Replication Security ............................................................................................ 2955
17.5.1 IP Address Whitelisting ....................................................................................... 2956
17.5.2 Secure Socket Layer Support (SSL) .................................................................... 2957
17.5.3 Virtual Private Networks (VPN) ........................................................................... 2958
17.6 Group Replication System Variables .............................................................................. 2959
17.7 Requirements and Limitations ........................................................................................ 2971
17.7.1 Group Replication Requirements ......................................................................... 2971
17.7.2 Group Replication Limitations .............................................................................. 2972
17.8 Frequently Asked Questions .......................................................................................... 2973
17.9 Group Replication Technical Details ............................................................................... 2976
17.9.1 Group Replication Plugin Architecture ................................................................. 2976
17.9.2 The Group ......................................................................................................... 2978
17.9.3 Data Manipulation Statements ............................................................................ 2978
![](https://csdnimg.cn/release/download_crawler_static/10239065/bg12.jpg)
MySQL 5.7 Reference Manual
xviii
17.9.4 Data Definition Statements ................................................................................. 2978
17.9.5 Distributed Recovery .......................................................................................... 2979
17.9.6 Observability ...................................................................................................... 2985
17.9.7 Group Replication Performance .......................................................................... 2986
18 MySQL Shell User Guide ......................................................................................................... 2991
18.1 MySQL Shell Features .................................................................................................. 2991
18.2 Getting Started with MySQL Shell .................................................................................. 2993
18.2.1 MySQL Shell Connections .................................................................................. 2993
18.2.2 MySQL Shell Sessions ....................................................................................... 2998
18.2.3 MySQL Shell Global Variables ............................................................................ 2999
18.3 MySQL Shell Code Execution ........................................................................................ 3001
18.3.1 Interactive Code Execution ................................................................................. 3001
18.3.2 Batch Code Execution ........................................................................................ 3003
18.3.3 Output Formats .................................................................................................. 3004
18.3.4 Active Language ................................................................................................ 3006
18.3.5 Batch Mode Made Interactive ............................................................................. 3007
18.4 Configuring MySQL Shell .............................................................................................. 3008
18.4.1 MySQL Shell Commands .................................................................................... 3008
18.5 MySQL Shell Application Log ........................................................................................ 3010
18.6 Customizing MySQL Shell ............................................................................................. 3011
18.6.1 Working With Start-Up Scripts ............................................................................. 3012
18.6.2 Adding Module Search Paths .............................................................................. 3012
18.6.3 Overriding the Default Prompt ............................................................................. 3013
19 Using MySQL as a Document Store ......................................................................................... 3015
19.1 Preproduction Status — Legal Notice ............................................................................. 3016
19.2 Key Concepts ............................................................................................................... 3016
19.3 Setting Up MySQL as a Document Store ....................................................................... 3017
19.3.1 Installing MySQL Shell ....................................................................................... 3020
19.3.2 Starting MySQL Shell ......................................................................................... 3024
19.4 Quick-Start Guide: MySQL Shell for JavaScript .............................................................. 3024
19.4.1 Introduction ........................................................................................................ 3025
19.4.2 Import Database Sample .................................................................................... 3026
19.4.3 MySQL Shell ...................................................................................................... 3027
19.4.4 Documents and Collections ................................................................................ 3028
19.4.5 Relational Tables ............................................................................................... 3039
19.4.6 Documents in Tables .......................................................................................... 3045
19.5 Quick-Start Guide: MySQL Shell for Python ................................................................... 3046
19.5.1 Introduction ........................................................................................................ 3046
19.5.2 Import Database Sample .................................................................................... 3047
19.5.3 MySQL Shell ...................................................................................................... 3048
19.5.4 Documents and Collections ................................................................................ 3049
19.5.5 Relational Tables ............................................................................................... 3060
19.5.6 Documents in Tables .......................................................................................... 3066
19.6 Quick-Start Guide: MySQL for Visual Studio ................................................................... 3067
19.7 X Plugin ....................................................................................................................... 3068
19.7.1 Using Secure Connections with X Plugin ............................................................. 3069
19.7.2 X Plugin Options and Variables .......................................................................... 3069
19.7.3 Monitoring X Plugin ............................................................................................ 3080
20 InnoDB Cluster ........................................................................................................................ 3085
20.1 Introducing InnoDB Cluster ............................................................................................ 3085
20.2 Creating an InnoDB Cluster ........................................................................................... 3087
20.2.1 Deployment Scenarios ........................................................................................ 3087
20.2.2 InnoDB Cluster Requirements ............................................................................. 3088
20.2.3 Methods of Installing .......................................................................................... 3088
![](https://csdnimg.cn/release/download_crawler_static/10239065/bg13.jpg)
MySQL 5.7 Reference Manual
xix
20.2.4 Sandbox Deployment of InnoDB Cluster .............................................................. 3089
20.2.5 Production Deployment of InnoDB Cluster ........................................................... 3092
20.2.6 Adopting a Group Replication Deployment ........................................................... 3100
20.3 Using MySQL Router with InnoDB Cluster ..................................................................... 3101
20.4 Working with InnoDB Cluster ......................................................................................... 3104
20.5 Known Limitations ......................................................................................................... 3114
21 MySQL NDB Cluster 7.5 and NDB Cluster 7.6 .......................................................................... 3117
21.1 NDB Cluster Overview .................................................................................................. 3121
21.1.1 NDB Cluster Core Concepts ............................................................................... 3123
21.1.2 NDB Cluster Nodes, Node Groups, Replicas, and Partitions ................................. 3125
21.1.3 NDB Cluster Hardware, Software, and Networking Requirements .......................... 3128
21.1.4 What is New in NDB Cluster ............................................................................... 3130
21.1.5 MySQL Server Using InnoDB Compared with NDB Cluster ................................... 3141
21.1.6 Known Limitations of NDB Cluster ...................................................................... 3144
21.2 NDB Cluster Installation ................................................................................................ 3155
21.2.1 The NDB Cluster Auto-Installer ........................................................................... 3158
21.2.2 Installation of NDB Cluster on Linux .................................................................... 3173
21.2.3 Installing NDB Cluster on Windows ..................................................................... 3183
21.2.4 Initial Configuration of NDB Cluster ..................................................................... 3192
21.2.5 Initial Startup of NDB Cluster .............................................................................. 3194
21.2.6 NDB Cluster Example with Tables and Data ........................................................ 3195
21.2.7 Safe Shutdown and Restart of NDB Cluster ......................................................... 3199
21.2.8 Upgrading and Downgrading NDB Cluster ........................................................... 3200
21.3 Configuration of NDB Cluster ......................................................................................... 3202
21.3.1 Quick Test Setup of NDB Cluster ........................................................................ 3202
21.3.2 Overview of NDB Cluster Configuration Parameters, Options, and Variables .......... 3205
21.3.3 NDB Cluster Configuration Files .......................................................................... 3250
21.3.4 Using High-Speed Interconnects with NDB Cluster ............................................... 3395
21.4 NDB Cluster Programs .................................................................................................. 3396
21.4.1 ndbd — The NDB Cluster Data Node Daemon .................................................... 3396
21.4.2 ndbinfo_select_all — Select From ndbinfo Tables ....................................... 3403
21.4.3 ndbmtd — The NDB Cluster Data Node Daemon (Multi-Threaded) ....................... 3405
21.4.4 ndb_mgmd — The NDB Cluster Management Server Daemon .............................. 3406
21.4.5 ndb_mgm — The NDB Cluster Management Client ............................................... 3414
21.4.6 ndb_blob_tool — Check and Repair BLOB and TEXT columns of NDB Cluster
Tables .......................................................................................................................... 3416
21.4.7 ndb_config — Extract NDB Cluster Configuration Information ............................ 3418
21.4.8 ndb_cpcd — Automate Testing for NDB Development ........................................ 3427
21.4.9 ndb_delete_all — Delete All Rows from an NDB Table ................................... 3427
21.4.10 ndb_desc — Describe NDB Tables .................................................................. 3428
21.4.11 ndb_drop_index — Drop Index from an NDB Table ........................................ 3434
21.4.12 ndb_drop_table — Drop an NDB Table ......................................................... 3435
21.4.13 ndb_error_reporter — NDB Error-Reporting Utility ...................................... 3436
21.4.14 ndb_import — Import CSV Data Into NDB ...................................................... 3437
21.4.15 ndb_index_stat — NDB Index Statistics Utility .............................................. 3450
21.4.16 ndb_move_data — NDB Data Copy Utility ....................................................... 3455
21.4.17 ndb_perror — Obtain NDB error message information .................................... 3458
21.4.18 ndb_print_backup_file — Print NDB Backup File Contents ......................... 3460
21.4.19 ndb_print_file — Print NDB Disk Data File Contents ................................... 3460
21.4.20 ndb_print_frag_file — Print NDB Fragment List File Contents .................... 3461
21.4.21 ndb_print_schema_file — Print NDB Schema File Contents ........................ 3462
21.4.22 ndb_print_sys_file — Print NDB System File Contents ............................... 3462
21.4.23 ndb_redo_log_reader — Check and Print Content of Cluster Redo Log .......... 3463
21.4.24 ndb_restore — Restore an NDB Cluster Backup ............................................ 3466
![](https://csdnimg.cn/release/download_crawler_static/10239065/bg14.jpg)
MySQL 5.7 Reference Manual
xx
21.4.25 ndb_select_all — Print Rows from an NDB Table ........................................ 3486
21.4.26 ndb_select_count — Print Row Counts for NDB Tables ................................ 3489
21.4.27 ndb_setup.py — Start browser-based Auto-Installer for NDB Cluster ................ 3490
21.4.28 ndb_show_tables — Display List of NDB Tables ............................................ 3493
21.4.29 ndb_size.pl — NDBCLUSTER Size Requirement Estimator ........................... 3494
21.4.30 ndb_top — View CPU usage information for NDB threads ................................ 3497
21.4.31 ndb_waiter — Wait for NDB Cluster to Reach a Given Status .......................... 3502
21.4.32 Options Common to NDB Cluster Programs — Options Common to NDB Cluster
Programs ...................................................................................................................... 3505
21.5 Management of NDB Cluster ......................................................................................... 3510
21.5.1 Summary of NDB Cluster Start Phases ............................................................... 3511
21.5.2 Commands in the NDB Cluster Management Client ............................................. 3512
21.5.3 Online Backup of NDB Cluster ............................................................................ 3517
21.5.4 MySQL Server Usage for NDB Cluster ................................................................ 3522
21.5.5 Performing a Rolling Restart of an NDB Cluster ................................................... 3523
21.5.6 Event Reports Generated in NDB Cluster ............................................................ 3526
21.5.7 NDB Cluster Log Messages ................................................................................ 3537
21.5.8 NDB Cluster Single User Mode ........................................................................... 3554
21.5.9 Quick Reference: NDB Cluster SQL Statements .................................................. 3554
21.5.10 ndbinfo: The NDB Cluster Information Database ................................................ 3557
21.5.11 INFORMATION_SCHEMA Tables for NDB Cluster ............................................. 3608
21.5.12 NDB Cluster Security Issues ............................................................................. 3609
21.5.13 NDB Cluster Disk Data Tables .......................................................................... 3616
21.5.14 Adding NDB Cluster Data Nodes Online ............................................................ 3624
21.5.15 Distributed MySQL Privileges for NDB Cluster ................................................... 3635
21.5.16 NDB API Statistics Counters and Variables ........................................................ 3639
21.6 NDB Cluster Replication ................................................................................................ 3651
21.6.1 NDB Cluster Replication: Abbreviations and Symbols ........................................... 3652
21.6.2 General Requirements for NDB Cluster Replication .............................................. 3653
21.6.3 Known Issues in NDB Cluster Replication ............................................................ 3654
21.6.4 NDB Cluster Replication Schema and Tables ...................................................... 3661
21.6.5 Preparing the NDB Cluster for Replication ........................................................... 3665
21.6.6 Starting NDB Cluster Replication (Single Replication Channel) .............................. 3667
21.6.7 Using Two Replication Channels for NDB Cluster Replication ............................... 3668
21.6.8 Implementing Failover with NDB Cluster Replication ............................................ 3669
21.6.9 NDB Cluster Backups With NDB Cluster Replication ............................................ 3671
21.6.10 NDB Cluster Replication: Multi-Master and Circular Replication ........................... 3677
21.6.11 NDB Cluster Replication Conflict Resolution ...................................................... 3681
21.7 NDB Cluster Release Notes .......................................................................................... 3695
22 Partitioning .............................................................................................................................. 3697
22.1 Overview of Partitioning in MySQL ................................................................................. 3699
22.2 Partitioning Types ......................................................................................................... 3702
22.2.1 RANGE Partitioning ............................................................................................ 3704
22.2.2 LIST Partitioning ................................................................................................. 3709
22.2.3 COLUMNS Partitioning ....................................................................................... 3711
22.2.4 HASH Partitioning .............................................................................................. 3719
22.2.5 KEY Partitioning ................................................................................................. 3723
22.2.6 Subpartitioning ................................................................................................... 3724
22.2.7 How MySQL Partitioning Handles NULL .............................................................. 3728
22.3 Partition Management ................................................................................................... 3732
22.3.1 Management of RANGE and LIST Partitions ........................................................ 3733
22.3.2 Management of HASH and KEY Partitions .......................................................... 3740
22.3.3 Exchanging Partitions and Subpartitions with Tables ............................................ 3741
22.3.4 Maintenance of Partitions ................................................................................... 3749
剩余5423页未读,继续阅读
104 浏览量
2016-08-15 上传
2024-02-06 上传
2023-05-09 上传
2023-06-20 上传
2023-10-13 上传
2023-07-15 上传
2023-08-08 上传
2023-06-24 上传
![](https://profile-avatar.csdnimg.cn/a87e458a13cc463691f387a6e0a7e4f2_jza6005186.jpg!1)
jza6005186
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- 多模态联合稀疏表示在视频目标跟踪中的应用
- Kubernetes资源管控与Gardener开源软件实践解析
- MPI集群监控与负载平衡策略
- 自动化PHP安全漏洞检测:静态代码分析与数据流方法
- 青苔数据CEO程永:技术生态与阿里云开放创新
- 制造业转型: HyperX引领企业上云策略
- 赵维五分享:航空工业电子采购上云实战与运维策略
- 单片机控制的LED点阵显示屏设计及其实现
- 驻云科技李俊涛:AI驱动的云上服务新趋势与挑战
- 6LoWPAN物联网边界路由器:设计与实现
- 猩便利工程师仲小玉:Terraform云资源管理最佳实践与团队协作
- 类差分度改进的互信息特征选择提升文本分类性能
- VERITAS与阿里云合作的混合云转型与数据保护方案
- 云制造中的生产线仿真模型设计与虚拟化研究
- 汪洋在PostgresChina2018分享:高可用 PostgreSQL 工具与架构设计
- 2018 PostgresChina大会:阿里云时空引擎Ganos在PostgreSQL中的创新应用与多模型存储
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)