没有合适的资源?快使用搜索试试~ 我知道了~
首页"MySQL 5.7官方文档:用户手册及英文版详解"
"MySQL 5.7官方文档:用户手册及英文版详解"
需积分: 40 5 下载量 46 浏览量
更新于2024-03-13
收藏 36.36MB PDF 举报
MySQL 5.7 Reference Manual is the official documentation for MySQL 5.7, including MySQL NDB Cluster 7.5 and NDB Cluster 7.6. It covers MySQL 5.7 up to version 5.7.39 and NDB Cluster releases based on version 7.5 of NDB up to version 5.7.37-ndb-7.5.26. The manual may also include documentation for features of MySQL versions that have not yet been released. Users can refer to the MySQL 5.7 Release Notes for information on the released versions.
The MySQL 5.7 Reference Manual provides a comprehensive overview of the features of MySQL 5.7. It includes information on how to install, configure, and use MySQL 5.7 and NDB Cluster. The manual covers a wide range of topics, including database management, security, performance tuning, and high availability. It also includes detailed information on new features introduced in MySQL 5.7, such as improved JSON support, enhanced security features, and performance optimizations.
The manual is available in both English and other languages, making it accessible to a global audience. Users can find detailed explanations, examples, and best practices for using MySQL 5.7 effectively. The manual is organized in a clear and logical manner, making it easy to navigate and find the information needed.
Overall, the MySQL 5.7 Reference Manual is a valuable resource for MySQL users looking to make the most of their database management system. Whether you are a beginner or an experienced user, the manual provides the information you need to successfully work with MySQL 5.7 and NDB Cluster. It is a comprehensive guide that covers all aspects of MySQL 5.7, ensuring that users can maximize the performance, security, and reliability of their database systems.
MySQL 5.7 Reference Manual
14.8.7 Using Asynchronous I/O on Linux ....................................................................... 2550
14.8.8 Configuring InnoDB I/O Capacity ......................................................................... 2551
14.8.9 Configuring Spin Lock Polling ............................................................................. 2552
14.8.10 Purge Configuration .......................................................................................... 2553
14.8.11 Configuring Optimizer Statistics for InnoDB ........................................................ 2555
14.8.12 Configuring the Merge Threshold for Index Pages .............................................. 2566
14.9 InnoDB Table and Page Compression ........................................................................... 2569
14.9.1 InnoDB Table Compression ................................................................................ 2569
14.9.2 InnoDB Page Compression ................................................................................. 2583
14.10 InnoDB File-Format Management ................................................................................. 2587
14.10.1 Enabling File Formats ....................................................................................... 2588
14.10.2 Verifying File Format Compatibility .................................................................... 2588
14.10.3 Identifying the File Format in Use ...................................................................... 2591
14.10.4 Modifying the File Format ................................................................................. 2592
14.11 InnoDB Row Formats .................................................................................................. 2593
14.12 InnoDB Disk I/O and File Space Management .............................................................. 2599
14.12.1 InnoDB Disk I/O ............................................................................................... 2600
14.12.2 File Space Management ................................................................................... 2601
14.12.3 InnoDB Checkpoints ......................................................................................... 2602
14.12.4 Defragmenting a Table ..................................................................................... 2602
14.12.5 Reclaiming Disk Space with TRUNCATE TABLE ............................................... 2603
14.13 InnoDB and Online DDL .............................................................................................. 2603
14.13.1 Online DDL Operations ..................................................................................... 2604
14.13.2 Online DDL Performance and Concurrency ........................................................ 2616
14.13.3 Online DDL Space Requirements ...................................................................... 2620
14.13.4 Simplifying DDL Statements with Online DDL .................................................... 2620
14.13.5 Online DDL Failure Conditions .......................................................................... 2621
14.13.6 Online DDL Limitations ..................................................................................... 2621
14.14 InnoDB Data-at-Rest Encryption .................................................................................. 2622
14.15 InnoDB Startup Options and System Variables ............................................................. 2627
14.16 InnoDB INFORMATION_SCHEMA Tables .................................................................... 2710
14.16.1 InnoDB INFORMATION_SCHEMA Tables about Compression ........................... 2710
14.16.2 InnoDB INFORMATION_SCHEMA Transaction and Locking Information ............. 2712
14.16.3 InnoDB INFORMATION_SCHEMA System Tables ............................................. 2719
14.16.4 InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables .............................. 2725
14.16.5 InnoDB INFORMATION_SCHEMA Buffer Pool Tables ........................................ 2728
14.16.6 InnoDB INFORMATION_SCHEMA Metrics Table ............................................... 2732
14.16.7 InnoDB INFORMATION_SCHEMA Temporary Table Info Table .......................... 2741
14.16.8 Retrieving InnoDB Tablespace Metadata from INFORMATION_SCHEMA.FILES .. 2742
14.17 InnoDB Integration with MySQL Performance Schema .................................................. 2744
14.17.1 Monitoring ALTER TABLE Progress for InnoDB Tables Using Performance
Schema ........................................................................................................................ 2746
14.17.2 Monitoring InnoDB Mutex Waits Using Performance Schema .............................. 2748
14.18 InnoDB Monitors ......................................................................................................... 2751
14.18.1 InnoDB Monitor Types ...................................................................................... 2752
14.18.2 Enabling InnoDB Monitors ................................................................................ 2752
14.18.3 InnoDB Standard Monitor and Lock Monitor Output ............................................ 2754
14.19 InnoDB Backup and Recovery ..................................................................................... 2759
14.19.1 InnoDB Backup ................................................................................................ 2759
14.19.2 InnoDB Recovery ............................................................................................. 2760
14.20 InnoDB and MySQL Replication ................................................................................... 2763
14.21 InnoDB memcached Plugin .......................................................................................... 2765
14.21.1 Benefits of the InnoDB memcached Plugin ........................................................ 2765
14.21.2 InnoDB memcached Architecture ...................................................................... 2766
xvi
MySQL 5.7 Reference Manual
14.21.3 Setting Up the InnoDB memcached Plugin ........................................................ 2770
14.21.4 Security Considerations for the InnoDB memcached Plugin ................................ 2776
14.21.5 Writing Applications for the InnoDB memcached Plugin ...................................... 2778
14.21.6 The InnoDB memcached Plugin and Replication ................................................ 2791
14.21.7 InnoDB memcached Plugin Internals ................................................................. 2794
14.21.8 Troubleshooting the InnoDB memcached Plugin ................................................ 2799
14.22 InnoDB Troubleshooting .............................................................................................. 2801
14.22.1 Troubleshooting InnoDB I/O Problems ............................................................... 2802
14.22.2 Forcing InnoDB Recovery ................................................................................. 2802
14.22.3 Troubleshooting InnoDB Data Dictionary Operations .......................................... 2804
14.22.4 InnoDB Error Handling ...................................................................................... 2808
14.23 InnoDB Limits ............................................................................................................. 2809
14.24 InnoDB Restrictions and Limitations ............................................................................. 2810
15 Alternative Storage Engines ..................................................................................................... 2813
15.1 Setting the Storage Engine ............................................................................................ 2816
15.2 The MyISAM Storage Engine ........................................................................................ 2817
15.2.1 MyISAM Startup Options .................................................................................... 2820
15.2.2 Space Needed for Keys ..................................................................................... 2821
15.2.3 MyISAM Table Storage Formats ......................................................................... 2822
15.2.4 MyISAM Table Problems .................................................................................... 2824
15.3 The MEMORY Storage Engine ...................................................................................... 2826
15.4 The CSV Storage Engine .............................................................................................. 2831
15.4.1 Repairing and Checking CSV Tables .................................................................. 2831
15.4.2 CSV Limitations ................................................................................................. 2832
15.5 The ARCHIVE Storage Engine ...................................................................................... 2832
15.6 The BLACKHOLE Storage Engine ................................................................................. 2834
15.7 The MERGE Storage Engine ......................................................................................... 2836
15.7.1 MERGE Table Advantages and Disadvantages .................................................... 2839
15.7.2 MERGE Table Problems ..................................................................................... 2840
15.8 The FEDERATED Storage Engine ................................................................................. 2841
15.8.1 FEDERATED Storage Engine Overview .............................................................. 2842
15.8.2 How to Create FEDERATED Tables ................................................................... 2843
15.8.3 FEDERATED Storage Engine Notes and Tips ..................................................... 2846
15.8.4 FEDERATED Storage Engine Resources ............................................................ 2847
15.9 The EXAMPLE Storage Engine ..................................................................................... 2847
15.10 Other Storage Engines ................................................................................................ 2848
15.11 Overview of MySQL Storage Engine Architecture ......................................................... 2848
15.11.1 Pluggable Storage Engine Architecture .............................................................. 2848
15.11.2 The Common Database Server Layer ................................................................ 2849
16 Replication ............................................................................................................................... 2851
16.1 Configuring Replication .................................................................................................. 2853
16.1.1 Binary Log File Position Based Replication Configuration Overview ....................... 2853
16.1.2 Setting Up Binary Log File Position Based Replication ......................................... 2854
16.1.3 Replication with Global Transaction Identifiers ..................................................... 2864
16.1.4 Changing Replication Modes on Online Servers ................................................... 2885
16.1.5 MySQL Multi-Source Replication ......................................................................... 2891
16.1.6 Replication and Binary Logging Options and Variables ......................................... 2897
16.1.7 Common Replication Administration Tasks .......................................................... 2975
16.2 Replication Implementation ............................................................................................ 2981
16.2.1 Replication Formats ............................................................................................ 2981
16.2.2 Replication Channels .......................................................................................... 2989
16.2.3 Replication Threads ............................................................................................ 2992
16.2.4 Relay Log and Replication Metadata Repositories ................................................ 2995
16.2.5 How Servers Evaluate Replication Filtering Rules ................................................ 3001
xvii
MySQL 5.7 Reference Manual
16.3 Replication Solutions ..................................................................................................... 3007
16.3.1 Using Replication for Backups ............................................................................ 3008
16.3.2 Handling an Unexpected Halt of a Replica ........................................................... 3012
16.3.3 Using Replication with Different Source and Replica Storage Engines ................... 3014
16.3.4 Using Replication for Scale-Out .......................................................................... 3015
16.3.5 Replicating Different Databases to Different Replicas ........................................... 3017
16.3.6 Improving Replication Performance ..................................................................... 3018
16.3.7 Switching Sources During Failover ...................................................................... 3020
16.3.8 Setting Up Replication to Use Encrypted Connections .......................................... 3022
16.3.9 Semisynchronous Replication ............................................................................. 3025
16.3.10 Delayed Replication .......................................................................................... 3031
16.4 Replication Notes and Tips ............................................................................................ 3031
16.4.1 Replication Features and Issues ......................................................................... 3031
16.4.2 Replication Compatibility Between MySQL Versions ............................................. 3058
16.4.3 Upgrading a Replication Topology ....................................................................... 3059
16.4.4 Troubleshooting Replication ................................................................................ 3061
16.4.5 How to Report Replication Bugs or Problems ...................................................... 3062
17 Group Replication .................................................................................................................... 3065
17.1 Group Replication Background ...................................................................................... 3066
17.1.1 Replication Technologies .................................................................................... 3067
17.1.2 Group Replication Use Cases ............................................................................. 3069
17.1.3 Group Replication Details ................................................................................... 3070
17.2 Getting Started .............................................................................................................. 3072
17.2.1 Deploying Group Replication in Single-Primary Mode ........................................... 3072
17.2.2 Deploying Group Replication Locally ................................................................... 3083
17.3 Requirements and Limitations ........................................................................................ 3084
17.3.1 Group Replication Requirements ......................................................................... 3084
17.3.2 Group Replication Limitations .............................................................................. 3086
17.4 Monitoring Group Replication ......................................................................................... 3088
17.4.1 Group Replication Server States ......................................................................... 3089
17.4.2 The replication_group_members Table ................................................................ 3090
17.4.3 The replication_group_member_stats Table ......................................................... 3090
17.5 Group Replication Operations ........................................................................................ 3091
17.5.1 Deploying in Multi-Primary or Single-Primary Mode .............................................. 3091
17.5.2 Tuning Recovery ................................................................................................ 3093
17.5.3 Network Partitioning ........................................................................................... 3094
17.5.4 Restarting a Group ............................................................................................. 3099
17.5.5 Using MySQL Enterprise Backup with Group Replication ...................................... 3101
17.6 Group Replication Security ............................................................................................ 3106
17.6.1 Group Replication IP Address Allowlisting ............................................................ 3106
17.6.2 Group Replication Secure Socket Layer (SSL) Support ........................................ 3108
17.6.3 Group Replication and Virtual Private Networks (VPNs) ........................................ 3110
17.7 Group Replication System Variables .............................................................................. 3110
17.8 Frequently Asked Questions .......................................................................................... 3130
17.9 Group Replication Technical Details ............................................................................... 3134
17.9.1 Group Replication Plugin Architecture ................................................................. 3134
17.9.2 The Group ......................................................................................................... 3136
17.9.3 Data Manipulation Statements ............................................................................ 3136
17.9.4 Data Definition Statements ................................................................................. 3136
17.9.5 Distributed Recovery .......................................................................................... 3137
17.9.6 Observability ...................................................................................................... 3144
17.9.7 Group Replication Performance .......................................................................... 3144
18 MySQL Shell ........................................................................................................................... 3149
19 Using MySQL as a Document Store ......................................................................................... 3151
xviii
MySQL 5.7 Reference Manual
19.1 Key Concepts ............................................................................................................... 3152
19.2 Setting Up MySQL as a Document Store ....................................................................... 3153
19.2.1 Installing MySQL Shell ....................................................................................... 3155
19.2.2 Starting MySQL Shell ......................................................................................... 3159
19.3 Quick-Start Guide: MySQL for Visual Studio ................................................................... 3159
19.4 X Plugin ....................................................................................................................... 3161
19.4.1 Using Encrypted Connections with X Plugin ......................................................... 3161
19.4.2 X Plugin Options and Variables .......................................................................... 3162
19.4.3 Monitoring X Plugin ............................................................................................ 3175
20 InnoDB Cluster ........................................................................................................................ 3177
21 MySQL NDB Cluster 7.5 and NDB Cluster 7.6 .......................................................................... 3181
21.1 General Information ....................................................................................................... 3183
21.2 NDB Cluster Overview .................................................................................................. 3185
21.2.1 NDB Cluster Core Concepts ............................................................................... 3187
21.2.2 NDB Cluster Nodes, Node Groups, Fragment Replicas, and Partitions ................... 3189
21.2.3 NDB Cluster Hardware, Software, and Networking Requirements .......................... 3193
21.2.4 What is New in NDB Cluster ............................................................................... 3194
21.2.5 NDB: Added, Deprecated, and Removed Options, Variables, and Parameters ........ 3211
21.2.6 MySQL Server Using InnoDB Compared with NDB Cluster ................................... 3214
21.2.7 Known Limitations of NDB Cluster ...................................................................... 3217
21.3 NDB Cluster Installation ................................................................................................ 3230
21.3.1 Installation of NDB Cluster on Linux .................................................................... 3233
21.3.2 Installing NDB Cluster on Windows ..................................................................... 3241
21.3.3 Initial Configuration of NDB Cluster ..................................................................... 3249
21.3.4 Initial Startup of NDB Cluster .............................................................................. 3251
21.3.5 NDB Cluster Example with Tables and Data ........................................................ 3252
21.3.6 Safe Shutdown and Restart of NDB Cluster ......................................................... 3256
21.3.7 Upgrading and Downgrading NDB Cluster ........................................................... 3257
21.3.8 The NDB Cluster Auto-Installer (NDB 7.5) (No longer supported) .......................... 3261
21.3.9 The NDB Cluster Auto-Installer (NDB 7.6) (No longer supported) .......................... 3273
21.4 Configuration of NDB Cluster ......................................................................................... 3296
21.4.1 Quick Test Setup of NDB Cluster ........................................................................ 3297
21.4.2 Overview of NDB Cluster Configuration Parameters, Options, and Variables .......... 3299
21.4.3 NDB Cluster Configuration Files .......................................................................... 3318
21.4.4 Using High-Speed Interconnects with NDB Cluster ............................................... 3479
21.5 NDB Cluster Programs .................................................................................................. 3479
21.5.1 ndbd — The NDB Cluster Data Node Daemon .................................................... 3480
21.5.2 ndbinfo_select_all — Select From ndbinfo Tables ................................................ 3490
21.5.3 ndbmtd — The NDB Cluster Data Node Daemon (Multi-Threaded) ........................ 3496
21.5.4 ndb_mgmd — The NDB Cluster Management Server Daemon ............................. 3497
21.5.5 ndb_mgm — The NDB Cluster Management Client .............................................. 3509
21.5.6 ndb_blob_tool — Check and Repair BLOB and TEXT columns of NDB Cluster
Tables .......................................................................................................................... 3514
21.5.7 ndb_config — Extract NDB Cluster Configuration Information ............................... 3520
21.5.8 ndb_cpcd — Automate Testing for NDB Development .......................................... 3532
21.5.9 ndb_delete_all — Delete All Rows from an NDB Table ......................................... 3532
21.5.10 ndb_desc — Describe NDB Tables ................................................................... 3537
21.5.11 ndb_drop_index — Drop Index from an NDB Table ............................................ 3547
21.5.12 ndb_drop_table — Drop an NDB Table ............................................................. 3552
21.5.13 ndb_error_reporter — NDB Error-Reporting Utility .............................................. 3556
21.5.14 ndb_import — Import CSV Data Into NDB ......................................................... 3558
21.5.15 ndb_index_stat — NDB Index Statistics Utility .................................................... 3577
21.5.16 ndb_move_data — NDB Data Copy Utility ......................................................... 3585
21.5.17 ndb_perror — Obtain NDB Error Message Information ....................................... 3591
xix
MySQL 5.7 Reference Manual
21.5.18 ndb_print_backup_file — Print NDB Backup File Contents .................................. 3593
21.5.19 ndb_print_file — Print NDB Disk Data File Contents ........................................... 3593
21.5.20 ndb_print_frag_file — Print NDB Fragment List File Contents .............................. 3594
21.5.21 ndb_print_schema_file — Print NDB Schema File Contents ................................ 3595
21.5.22 ndb_print_sys_file — Print NDB System File Contents ........................................ 3595
21.5.23 ndb_redo_log_reader — Check and Print Content of Cluster Redo Log ................ 3595
21.5.24 ndb_restore — Restore an NDB Cluster Backup ................................................ 3598
21.5.25 ndb_select_all — Print Rows from an NDB Table ............................................... 3628
21.5.26 ndb_select_count — Print Row Counts for NDB Tables ...................................... 3635
21.5.27 ndb_setup.py — Start browser-based Auto-Installer for NDB Cluster
(DEPRECATED) ........................................................................................................... 3639
21.5.28 ndb_show_tables — Display List of NDB Tables ................................................ 3643
21.5.29 ndb_size.pl — NDBCLUSTER Size Requirement Estimator ................................ 3648
21.5.30 ndb_top — View CPU usage information for NDB threads .................................. 3651
21.5.31 ndb_waiter — Wait for NDB Cluster to Reach a Given Status ............................. 3657
21.6 Management of NDB Cluster ......................................................................................... 3664
21.6.1 Commands in the NDB Cluster Management Client ............................................. 3665
21.6.2 NDB Cluster Log Messages ................................................................................ 3671
21.6.3 Event Reports Generated in NDB Cluster ............................................................ 3690
21.6.4 Summary of NDB Cluster Start Phases ............................................................... 3702
21.6.5 Performing a Rolling Restart of an NDB Cluster ................................................... 3704
21.6.6 NDB Cluster Single User Mode ........................................................................... 3706
21.6.7 Adding NDB Cluster Data Nodes Online .............................................................. 3707
21.6.8 Online Backup of NDB Cluster ............................................................................ 3718
21.6.9 MySQL Server Usage for NDB Cluster ................................................................ 3723
21.6.10 NDB Cluster Disk Data Tables .......................................................................... 3724
21.6.11 Online Operations with ALTER TABLE in NDB Cluster ....................................... 3730
21.6.12 Distributed Privileges Using Shared Grant Tables .............................................. 3734
21.6.13 NDB API Statistics Counters and Variables ........................................................ 3737
21.6.14 ndbinfo: The NDB Cluster Information Database ................................................ 3748
21.6.15 INFORMATION_SCHEMA Tables for NDB Cluster ............................................. 3812
21.6.16 Quick Reference: NDB Cluster SQL Statements ................................................ 3812
21.6.17 NDB Cluster Security Issues ............................................................................. 3821
21.7 NDB Cluster Replication ................................................................................................ 3828
21.7.1 NDB Cluster Replication: Abbreviations and Symbols ........................................... 3830
21.7.2 General Requirements for NDB Cluster Replication .............................................. 3830
21.7.3 Known Issues in NDB Cluster Replication ............................................................ 3831
21.7.4 NDB Cluster Replication Schema and Tables ...................................................... 3838
21.7.5 Preparing the NDB Cluster for Replication ........................................................... 3845
21.7.6 Starting NDB Cluster Replication (Single Replication Channel) .............................. 3846
21.7.7 Using Two Replication Channels for NDB Cluster Replication ............................... 3848
21.7.8 Implementing Failover with NDB Cluster Replication ............................................ 3849
21.7.9 NDB Cluster Backups With NDB Cluster Replication ............................................ 3851
21.7.10 NDB Cluster Replication: Bidirectional and Circular Replication ........................... 3857
21.7.11 NDB Cluster Replication Conflict Resolution ...................................................... 3861
21.8 NDB Cluster Release Notes .......................................................................................... 3874
22 Partitioning .............................................................................................................................. 3875
22.1 Overview of Partitioning in MySQL ................................................................................. 3877
22.2 Partitioning Types ......................................................................................................... 3880
22.2.1 RANGE Partitioning ............................................................................................ 3882
22.2.2 LIST Partitioning ................................................................................................. 3886
22.2.3 COLUMNS Partitioning ....................................................................................... 3888
22.2.4 HASH Partitioning .............................................................................................. 3896
22.2.5 KEY Partitioning ................................................................................................. 3899
xx
剩余5293页未读,继续阅读
2020-07-28 上传
2018-08-17 上传
2018-09-12 上传
2024-07-18 上传
2018-09-05 上传
2017-12-08 上传
2020-10-20 上传
151 浏览量
残鸢
- 粉丝: 1
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 毕业设计&课设--分享一个适合初学者的图书管理系统(毕业设计)无框架原生.zip
- marvel_api
- Chrome-Memory-Manager:此扩展仅在 chrome 的开发者频道上有效。 Chrome合金
- Broad-Learning-System:BLS代码
- 毕业设计&课设--东北大学本科毕业设计模板.zip
- mcmc_clib:C程序简化ODE模型参数的歧管MALA采样
- yii2-meta-activerecord:一个简单的Yii2扩展,扩展了ActiveRecord功能,以允许在补充表中使用WordPress样式的元字段
- job-recover-client:JobRecover的客户端文件(前端)
- TestDrive-Titanium:使用这个空白的 Titanium 应用程序试驾 Kinvey
- final-form-focus::chequered_flag:最终表单“装饰器”,它将在尝试提交表单时尝试将焦点应用于第一个字段,但会出现错误
- keras-recommendation:使用Keras实施推荐系统
- Excel模板年度工程类中初级打分汇总表.zip
- GoIT-Course:这是我在GoIT课程中的第二门课程
- 毕业设计&课设--高校毕业设计管理系统(毕业设计).zip
- PyTorchZeroToAll:DL-SEMINAR第1周任务
- Geo_Aggs-Map
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功