没有合适的资源?快使用搜索试试~ 我知道了~
mysql9.0的技术文档,学习mysql需要
需积分: 1 1 下载量 76 浏览量
2024-11-22
18:25:56
上传
评论
收藏 40.43MB PDF 举报
温馨提示
mysql9.0的技术文档,学习mysql需要
资源推荐
资源详情
资源评论
MySQL 9.1 Reference Manual
Including MySQL NDB Cluster 9.1
Abstract
This is the MySQL Reference Manual. It documents MySQL 9.1 (9.1.0), as well as NDB Cluster 9.1 (9.1.0),
respectively. It may include documentation of features of MySQL versions that have not yet been released. For
information about which versions have been released, see the MySQL 9.1 Release Notes.
MySQL 9.1 features. This manual describes features that are not included in every edition of MySQL 9.1; such
features may not be included in the edition of MySQL 9.1 licensed to you. If you have any questions about the
features included in your edition of MySQL 9.1, refer to your MySQL 9.1 license agreement or contact your Oracle
sales representative.
For notes detailing the changes in each release, see the MySQL 9.1 Release Notes.
For legal information, including licensing information, see the Preface and Legal Notices.
For help with using MySQL, please visit the MySQL Forums, where you can discuss your issues with other
MySQL users.
Document generated on: 2024-11-19 (revision: 80261)
Table of Contents
Preface and Legal Notices ....................................................................................................... xxvii
1 General Information ................................................................................................................... 1
1.1 About This Manual .......................................................................................................... 2
1.2 Overview of the MySQL Database Management System ................................................... 4
1.2.1 What is MySQL? .................................................................................................. 4
1.2.2 The Main Features of MySQL ............................................................................... 5
1.2.3 History of MySQL ................................................................................................. 8
1.3 MySQL Releases: Innovation and LTS ............................................................................. 9
1.4 What Is New in MySQL 9.1 ........................................................................................... 10
1.5 Server and Status Variables and Options Added, Deprecated, or Removed in MySQL
9.1 ...................................................................................................................................... 16
1.6 How to Report Bugs or Problems .................................................................................. 18
1.7 MySQL Standards Compliance ...................................................................................... 22
1.7.1 MySQL Extensions to Standard SQL ................................................................... 23
1.7.2 MySQL Differences from Standard SQL .............................................................. 26
1.7.3 How MySQL Deals with Constraints .................................................................... 29
2 Installing MySQL ..................................................................................................................... 31
2.1 General Installation Guidance ........................................................................................ 33
2.1.1 Supported Platforms ........................................................................................... 33
2.1.2 Which MySQL Version and Distribution to Install .................................................. 33
2.1.3 How to Get MySQL ............................................................................................ 34
2.1.4 Verifying Package Integrity Using MD5 Checksums or GnuPG .............................. 35
2.1.5 Installation Layouts ............................................................................................. 50
2.1.6 Compiler-Specific Build Characteristics ................................................................ 50
2.2 Installing MySQL on Unix/Linux Using Generic Binaries .................................................. 50
2.3 Installing MySQL on Microsoft Windows ......................................................................... 53
2.3.1 Choosing an Installation Package ....................................................................... 56
2.3.2 Configuration: Using MySQL Configurator ............................................................ 57
2.3.3 Configuration: Manually ...................................................................................... 63
2.3.4 Troubleshooting a Microsoft Windows MySQL Server Installation .......................... 71
2.3.5 Windows Postinstallation Procedures .................................................................. 72
2.3.6 Windows Platform Restrictions ............................................................................ 74
2.4 Installing MySQL on macOS .......................................................................................... 76
2.4.1 General Notes on Installing MySQL on macOS .................................................... 76
2.4.2 Installing MySQL on macOS Using Native Packages ............................................ 77
2.4.3 Installing and Using the MySQL Launch Daemon ................................................. 79
2.4.4 Installing and Using the MySQL Preference Pane ................................................ 82
2.5 Installing MySQL on Linux ............................................................................................. 86
2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository ............................... 87
2.5.2 Installing MySQL on Linux Using the MySQL APT Repository ............................... 92
2.5.3 Using the MySQL SLES Repository .................................................................. 101
2.5.4 Installing MySQL on Linux Using RPM Packages from Oracle ............................. 106
2.5.5 Installing MySQL on Linux Using Debian Packages from Oracle .......................... 111
2.5.6 Deploying MySQL on Linux with Docker Containers ........................................... 112
2.5.7 Installing MySQL on Linux from the Native Software Repositories ........................ 124
2.5.8 Installing MySQL on Linux with Juju .................................................................. 126
2.5.9 Managing MySQL Server with systemd ............................................................. 126
2.6 Installing MySQL Using Unbreakable Linux Network (ULN) ........................................... 131
2.7 Installing MySQL on Solaris ......................................................................................... 132
2.7.1 Installing MySQL on Solaris Using a Solaris PKG .............................................. 132
2.8 Installing MySQL from Source ..................................................................................... 133
2.8.1 Source Installation Methods .............................................................................. 134
2.8.2 Source Installation Prerequisites ....................................................................... 134
2.8.3 MySQL Layout for Source Installation ................................................................ 135
2.8.4 Installing MySQL Using a Standard Source Distribution ...................................... 136
iii
MySQL 9.1 Reference Manual
2.8.5 Installing MySQL Using a Development Source Tree .......................................... 140
2.8.6 Configuring SSL Library Support ....................................................................... 141
2.8.7 MySQL Source-Configuration Options ............................................................... 142
2.8.8 Dealing with Problems Compiling MySQL .......................................................... 167
2.8.9 MySQL Configuration and Third-Party Tools ...................................................... 168
2.8.10 Generating MySQL Doxygen Documentation Content ....................................... 169
2.9 Postinstallation Setup and Testing ............................................................................... 169
2.9.1 Initializing the Data Directory ............................................................................ 170
2.9.2 Starting the Server ........................................................................................... 175
2.9.3 Testing the Server ............................................................................................ 178
2.9.4 Securing the Initial MySQL Account .................................................................. 180
2.9.5 Starting and Stopping MySQL Automatically ...................................................... 181
2.10 Perl Installation Notes ................................................................................................ 182
2.10.1 Installing Perl on Unix ..................................................................................... 183
2.10.2 Installing ActiveState Perl on Windows ............................................................ 184
2.10.3 Problems Using the Perl DBI/DBD Interface ..................................................... 184
3 Upgrading MySQL ................................................................................................................. 187
3.1 Before You Begin ........................................................................................................ 187
3.2 Upgrade Paths ............................................................................................................ 188
3.3 Upgrade Best Practices ............................................................................................... 189
3.4 What the MySQL Upgrade Process Upgrades .............................................................. 191
3.5 Changes in MySQL 9.1 ............................................................................................... 194
3.6 Preparing Your Installation for Upgrade ........................................................................ 194
3.7 Upgrading MySQL Binary or Package-based Installations on Unix/Linux ......................... 197
3.8 Upgrading MySQL with the MySQL Yum Repository ..................................................... 200
3.9 Upgrading MySQL with the MySQL APT Repository ..................................................... 202
3.10 Upgrading MySQL with the MySQL SLES Repository .................................................. 202
3.11 Upgrading MySQL on Windows ................................................................................. 202
3.12 Upgrading a Docker Installation of MySQL ................................................................. 203
3.13 Upgrade Troubleshooting ........................................................................................... 203
3.14 Rebuilding or Repairing Tables or Indexes ................................................................. 204
3.15 Copying MySQL Databases to Another Machine ......................................................... 205
4 Downgrading MySQL ............................................................................................................. 207
5 Tutorial .................................................................................................................................. 209
5.1 Connecting to and Disconnecting from the Server ......................................................... 209
5.2 Entering Queries ......................................................................................................... 210
5.3 Creating and Using a Database ................................................................................... 213
5.3.1 Creating and Selecting a Database ................................................................... 214
5.3.2 Creating a Table .............................................................................................. 215
5.3.3 Loading Data into a Table ................................................................................ 216
5.3.4 Retrieving Information from a Table ................................................................... 217
5.4 Getting Information About Databases and Tables ......................................................... 230
5.5 Using mysql in Batch Mode ......................................................................................... 231
5.6 Examples of Common Queries .................................................................................... 232
5.6.1 The Maximum Value for a Column .................................................................... 233
5.6.2 The Row Holding the Maximum of a Certain Column .......................................... 233
5.6.3 Maximum of Column per Group ........................................................................ 233
5.6.4 The Rows Holding the Group-wise Maximum of a Certain Column ....................... 234
5.6.5 Using User-Defined Variables ........................................................................... 235
5.6.6 Using Foreign Keys .......................................................................................... 235
5.6.7 Searching on Two Keys .................................................................................... 237
5.6.8 Calculating Visits Per Day ................................................................................. 237
5.6.9 Using AUTO_INCREMENT ............................................................................... 238
5.7 Using MySQL with Apache .......................................................................................... 240
6 MySQL Programs .................................................................................................................. 243
6.1 Overview of MySQL Programs ..................................................................................... 244
6.2 Using MySQL Programs .............................................................................................. 247
6.2.1 Invoking MySQL Programs ............................................................................... 247
iv
MySQL 9.1 Reference Manual
6.2.2 Specifying Program Options .............................................................................. 248
6.2.3 Command Options for Connecting to the Server ................................................ 262
6.2.4 Connecting to the MySQL Server Using Command Options ................................ 274
6.2.5 Connecting to the Server Using URI-Like Strings or Key-Value Pairs ................... 277
6.2.6 Connecting to the Server Using DNS SRV Records ........................................... 284
6.2.7 Connection Transport Protocols ........................................................................ 285
6.2.8 Connection Compression Control ...................................................................... 286
6.2.9 Setting Environment Variables .......................................................................... 290
6.3 Server and Server-Startup Programs ........................................................................... 291
6.3.1 mysqld — The MySQL Server .......................................................................... 291
6.3.2 mysqld_safe — MySQL Server Startup Script .................................................... 291
6.3.3 mysql.server — MySQL Server Startup Script .................................................... 300
6.3.4 mysqld_multi — Manage Multiple MySQL Servers .............................................. 302
6.4 Installation-Related Programs ...................................................................................... 307
6.4.1 comp_err — Compile MySQL Error Message File .............................................. 307
6.4.2 mysql_secure_installation — Improve MySQL Installation Security ...................... 309
6.4.3 mysql_tzinfo_to_sql — Load the Time Zone Tables ............................................ 315
6.5 Client Programs .......................................................................................................... 315
6.5.1 mysql — The MySQL Command-Line Client ...................................................... 315
6.5.2 mysqladmin — A MySQL Server Administration Program ................................... 359
6.5.3 mysqlcheck — A Table Maintenance Program ................................................... 375
6.5.4 mysqldump — A Database Backup Program ..................................................... 389
6.5.5 mysqlimport — A Data Import Program ............................................................. 426
6.5.6 mysqlshow — Display Database, Table, and Column Information ........................ 440
6.5.7 mysqlslap — A Load Emulation Client ............................................................... 451
6.6 Administrative and Utility Programs .............................................................................. 468
6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility ........................................... 468
6.6.2 innochecksum — Offline InnoDB File Checksum Utility ....................................... 473
6.6.3 myisam_ftdump — Display Full-Text Index information ....................................... 480
6.6.4 myisamchk — MyISAM Table-Maintenance Utility .............................................. 481
6.6.5 myisamlog — Display MyISAM Log File Contents .............................................. 500
6.6.6 myisampack — Generate Compressed, Read-Only MyISAM Tables .................... 501
6.6.7 mysql_config_editor — MySQL Configuration Utility ........................................... 507
6.6.8 mysql_migrate_keyring — Keyring Key Migration Utility ...................................... 514
6.6.9 mysqlbinlog — Utility for Processing Binary Log Files ......................................... 523
6.6.10 mysqldumpslow — Summarize Slow Query Log Files ....................................... 553
6.7 Program Development Utilities ..................................................................................... 556
6.7.1 mysql_config — Display Options for Compiling Clients ....................................... 556
6.7.2 my_print_defaults — Display Options from Option Files ...................................... 557
6.8 Miscellaneous Programs .............................................................................................. 559
6.8.1 perror — Display MySQL Error Message Information .......................................... 559
6.9 Environment Variables ................................................................................................. 559
6.10 Unix Signal Handling in MySQL ................................................................................. 562
7 MySQL Server Administration ................................................................................................. 563
7.1 The MySQL Server ..................................................................................................... 564
7.1.1 Configuring the Server ...................................................................................... 565
7.1.2 Server Configuration Defaults ........................................................................... 566
7.1.3 Server Configuration Validation ......................................................................... 566
7.1.4 Server Option, System Variable, and Status Variable Reference ......................... 567
7.1.5 Server System Variable Reference .................................................................... 616
7.1.6 Server Status Variable Reference ..................................................................... 642
7.1.7 Server Command Options ................................................................................. 660
7.1.8 Server System Variables .................................................................................. 684
7.1.9 Using System Variables .................................................................................... 840
7.1.10 Server Status Variables .................................................................................. 871
7.1.11 Server SQL Modes ......................................................................................... 897
7.1.12 Connection Management ................................................................................ 909
7.1.13 IPv6 Support .................................................................................................. 916
v
剩余6083页未读,继续阅读
资源评论
記憶的深藍
- 粉丝: 28
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功