| Introduction |
|
1 | (10) |
|
|
|
2 | (2) |
|
What You Can Expect from This Book |
|
|
4 | (1) |
|
|
|
4 | (2) |
|
|
|
4 | (1) |
|
Part II Using MySQL Programming Interfaces |
|
|
5 | (1) |
|
Part III MySQL Administration |
|
|
5 | (1) |
|
|
|
6 | (1) |
|
|
|
6 | (1) |
|
Versions of Software Covered in This Book |
|
|
7 | (2) |
|
Conventions Used in This Book |
|
|
9 | (1) |
|
|
|
9 | (2) |
|
|
|
|
1 Getting Started with MySQL |
|
|
11 | (84) |
|
1.1 How MySQL Can Help You |
|
|
11 | (3) |
|
|
|
14 | (4) |
|
1.2.1 The U.S. Historical League Project |
|
|
15 | (2) |
|
1.2.2 The Grade-Keeping Project |
|
|
17 | (1) |
|
1.2.3 How the Sample Database Applies to You |
|
|
17 | (1) |
|
1.3 Basic Database Terminology |
|
|
18 | (4) |
|
1.3.1 Structural Terminology |
|
|
18 | (2) |
|
1.3.2 Query Language Terminology |
|
|
20 | (1) |
|
1.3.3 MySQL Architectural Terminology |
|
|
21 | (1) |
|
|
|
22 | (65) |
|
1.4.1 Obtaining the Sample Database Distribution |
|
|
23 | (1) |
|
1.4.2 Preliminary Requirements |
|
|
23 | (2) |
|
1.4.3 Establishing and Terminating Connections to the MySQL Server |
|
|
25 | (2) |
|
1.4.4 Executing SQL Statements |
|
|
27 | (3) |
|
1.4.5 Creating a Database |
|
|
30 | (1) |
|
|
|
31 | (18) |
|
|
|
49 | (4) |
|
1.4.8 Resetting the sampdb Database to a Known State |
|
|
53 | (1) |
|
1.4.9 Retrieving Information |
|
|
54 | (31) |
|
1.4.10 Deleting or Updating Existing Rows |
|
|
85 | (2) |
|
1.5 Tips for Interacting with mysql |
|
|
87 | (7) |
|
1.5.1 Simplifying the Connection Process |
|
|
87 | (3) |
|
1.5.2 Issuing Statements with Less Typing |
|
|
90 | (4) |
|
|
|
94 | (1) |
|
2 Using SQL to Manage Data |
|
|
95 | (84) |
|
|
|
96 | (1) |
|
2.2 MySQL Identifier Syntax and Naming Rules |
|
|
97 | (2) |
|
2.3 Case Sensitivity in SQL Statements |
|
|
99 | (2) |
|
2.4 Character Set Support |
|
|
101 | (4) |
|
2.4.1 Specifying Character Sets |
|
|
102 | (1) |
|
2.4.2 Determining Character Set Availability and Current Settings |
|
|
103 | (1) |
|
|
|
104 | (1) |
|
2.5 Selecting, Creating, Dropping, and Altering Databases |
|
|
105 | (2) |
|
2.5.1 Selecting Databases |
|
|
105 | (1) |
|
|
|
106 | (1) |
|
|
|
107 | (1) |
|
|
|
107 | (1) |
|
2.6 Creating, Dropping, Indexing, and Altering Tables |
|
|
107 | (23) |
|
2.6.1 Storage Engine Characteristics |
|
|
108 | (5) |
|
|
|
113 | (8) |
|
|
|
121 | (1) |
|
|
|
122 | (5) |
|
2.6.5 Altering Table Structure |
|
|
127 | (3) |
|
2.7 Obtaining Database Metadata |
|
|
130 | (6) |
|
2.7.1 Obtaining Metadata with SHOW |
|
|
130 | (2) |
|
2.7.2 Obtaining Metadata with Information_Schema |
|
|
132 | (3) |
|
2.7.3 Obtaining Metadata from the Command Line |
|
|
135 | (1) |
|
2.8 Performing Multiple-Table Retrievals with Joins |
|
|
136 | (7) |
|
|
|
137 | (2) |
|
2.8.2 Qualifying References to Columns from Joined Tables |
|
|
139 | (1) |
|
2.8.3 Left and Right (Outer) Joins |
|
|
139 | (4) |
|
2.9 Performing Multiple-Table Retrievals with Subqueries |
|
|
143 | (8) |
|
2.9.1 Subqueries with Relative Comparison Operators |
|
|
144 | (1) |
|
2.9.2 IN and NOT IN Subqueries |
|
|
145 | (1) |
|
2.9.3 ALL, ANY, and SOME Subqueries |
|
|
146 | (1) |
|
2.9.4 EXISTS and NOT EXISTS Subqueries |
|
|
147 | (1) |
|
2.9.5 Correlated Subqueries |
|
|
148 | (1) |
|
2.9.6 Subqueries in the FROM Clause |
|
|
149 | (1) |
|
2.9.7 Rewriting Subqueries as Joins |
|
|
149 | (2) |
|
2.10 Performing Multiple-Table Retrievals with UNION |
|
|
151 | (3) |
|
2.11 Multiple-Table Deletes and Updates |
|
|
154 | (2) |
|
2.12 Performing Transactions |
|
|
156 | (8) |
|
2.12.1 Using Transactions to Ensure Safe Statement Execution |
|
|
157 | (4) |
|
2.12.2 Using Transaction Savepoints |
|
|
161 | (1) |
|
2.12.3 Transaction Isolation |
|
|
162 | (2) |
|
2.13 Foreign Keys and Referential Integrity |
|
|
164 | (6) |
|
2.14 Using FULLTEXT Searches |
|
|
170 | (9) |
|
2.14.1 Natural Language FULLTEXT Searches |
|
|
172 | (2) |
|
2.14.2 Boolean Mode FULLTEXT Searches |
|
|
174 | (1) |
|
2.14.3 Query Expansion FULLTEXT Searches |
|
|
175 | (1) |
|
2.14.4 Configuring the FULLTEXT Search Engine |
|
|
176 | (3) |
|
|
|
179 | (82) |
|
3.1 Data Value Categories |
|
|
181 | (11) |
|
|
|
181 | (1) |
|
|
|
182 | (9) |
|
3.1.3 Temporal (Date and Time) Values |
|
|
191 | (1) |
|
|
|
191 | (1) |
|
|
|
192 | (1) |
|
|
|
192 | (1) |
|
|
|
192 | (36) |
|
|
|
193 | (1) |
|
3.2.2 Specifying Column Types in Table Definitions |
|
|
194 | (2) |
|
3.2.3 Specifying Column Default Values |
|
|
196 | (1) |
|
|
|
196 | (8) |
|
|
|
204 | (14) |
|
3.2.6 Temporal (Date and Time) Data Types |
|
|
218 | (10) |
|
3.3 How MySQL Handles Invalid Data Values |
|
|
228 | (2) |
|
3.4 Working with Sequences |
|
|
230 | (9) |
|
3.4.1 General AUTO_INCREMENT Properties |
|
|
230 | (2) |
|
3.4.2 Storage Engine-Specific AUTO_INCREMENT Properties |
|
|
232 | (3) |
|
3.4.3 Issues to Consider with AUTO_INCREMENT Columns |
|
|
235 | (1) |
|
3.4.4 Tips for Working with AUTO_INCREMENT Columns |
|
|
235 | (2) |
|
3.4.5 Generating Sequences Without AUTO_INCREMENT |
|
|
237 | (2) |
|
3.5 Expression Evaluation and Type Conversion |
|
|
239 | (16) |
|
3.5.1 Writing Expressions |
|
|
240 | (7) |
|
|
|
247 | (8) |
|
|
|
255 | (6) |
|
3.6.1 What Kind of Values Will the Column Hold? |
|
|
257 | (2) |
|
3.6.2 Do Your Values Lie Within Some Particular Range? |
|
|
259 | (2) |
|
4 Views and Stored Programs |
|
|
261 | (16) |
|
|
|
262 | (3) |
|
4.2 Using Stored Programs |
|
|
265 | (10) |
|
4.2.1 Compound Statements and Statement Delimiters |
|
|
266 | (2) |
|
4.2.2 Stored Functions and Procedures |
|
|
268 | (4) |
|
|
|
272 | (2) |
|
|
|
274 | (1) |
|
4.3 Security for Views and Stored Programs |
|
|
275 | (2) |
|
|
|
277 | (30) |
|
|
|
277 | (8) |
|
5.1.1 Benefits of Indexing |
|
|
278 | (3) |
|
|
|
281 | (1) |
|
|
|
281 | (4) |
|
5.2 The MySQL Query Optimizer |
|
|
285 | (11) |
|
5.2.1 How the Optimizer Works |
|
|
286 | (4) |
|
5.2.2 Using EXPLAIN to Check Optimizer Operation |
|
|
290 | (6) |
|
5.3 Choosing Data Types for Efficient Queries |
|
|
296 | (3) |
|
5.4 Choosing Table Storage Formats for Efficient Queries |
|
|
299 | (1) |
|
5.5 Loading Data Efficiently |
|
|
300 | (3) |
|
5.6 Scheduling, Locking, and Concurrency |
|
|
303 | (4) |
|
Part II Using MySQL Programming Interfaces |
|
|
|
6 Introduction to MySQL Programming |
|
|
307 | (12) |
|
6.1 Why Write Your Own MySQL Programs? |
|
|
307 | (3) |
|
6.2 APIs Available for MySQL |
|
|
310 | (4) |
|
|
|
311 | (1) |
|
|
|
311 | (2) |
|
|
|
313 | (1) |
|
|
|
314 | (5) |
|
6.3.1 Execution Environment |
|
|
314 | (1) |
|
|
|
315 | (1) |
|
|
|
316 | (1) |
|
|
|
317 | (2) |
|
7 Writing MySQL Programs Using C |
|
|
319 | (76) |
|
7.1 Compiling and Linking Client Programs |
|
|
320 | (3) |
|
7.2 Connecting to the Server |
|
|
323 | (4) |
|
7.3 Handling Errors and Processing Command Options |
|
|
327 | (21) |
|
7.3.1 Checking for Errors |
|
|
327 | (3) |
|
7.3.2 Getting Connection Parameters at Runtime |
|
|
330 | (14) |
|
7.3.3 Incorporating Option Processing into a Client Program |
|
|
344 | (4) |
|
7.4 Processing SQL Statements |
|
|
348 | (20) |
|
7.4.1 Handling Statements That Modify Rows |
|
|
350 | (1) |
|
7.4.2 Handling Statements That Return a Result Set |
|
|
351 | (3) |
|
7.4.3 A General-Purpose Statement Handler |
|
|
354 | (2) |
|
7.4.4 Alternative Approaches to Statement Processing |
|
|
356 | (1) |
|
7.4.5 mysql_store_result() Versus mysql_use_result() |
|
|
357 | (2) |
|
7.4.6 Using Result Set Metadata |
|
|
359 | (5) |
|
7.4.7 Encoding Special Characters and Binary Data |
|
|
364 | (4) |
|
7.5 An Interactive Statement-Execution Program |
|
|
368 | (2) |
|
7.6 Writing Clients That Include SSL Support |
|
|
370 | (5) |
|
7.7 Using Multiple-Statement Execution |
|
|
375 | (2) |
|
7.8 Using Server-Side Prepared Statements |
|
|
377 | (12) |
|
7.9 Using Prepared CALL Support |
|
|
389 | (6) |
|
8 Writing MySQL Programs Using Perl DBI |
|
|
395 | (90) |
|
8.1 Perl Script Characteristics |
|
|
396 | (1) |
|
|
|
396 | (40) |
|
|
|
396 | (1) |
|
8.2.2 A Simple DBI Script |
|
|
397 | (5) |
|
|
|
402 | (4) |
|
8.2.4 Handling Statements That Modify Rows |
|
|
406 | (1) |
|
8.2.5 Handling Statements That Return a Result Set |
|
|
407 | (9) |
|
8.2.6 Quoting Special Characters in Statement Strings |
|
|
416 | (3) |
|
8.2.7 Placeholders and Prepared Statements |
|
|
419 | (3) |
|
8.2.8 Binding Query Results to Script Variables |
|
|
422 | (1) |
|
8.2.9 Specifying Connection Parameters |
|
|
423 | (3) |
|
|
|
426 | (4) |
|
8.2.11 Using Result Set Metadata |
|
|
430 | (4) |
|
8.2.12 Performing Transactions |
|
|
434 | (2) |
|
|
|
436 | (23) |
|
8.3.1 Generating the Historical League Directory |
|
|
436 | (6) |
|
8.3.2 Sending Membership Renewal Notices |
|
|
442 | (6) |
|
8.3.3 Historical League Member Entry Editing |
|
|
448 | (6) |
|
8.3.4 Finding Historical League Members with Common Interests |
|
|
454 | (1) |
|
8.3.5 Putting the Historical League Directory Online |
|
|
455 | (4) |
|
8.4 Using DBI in Web Applications |
|
|
459 | (26) |
|
8.4.1 Setting Up Apache for CGI Scripts |
|
|
460 | (1) |
|
8.4.2 A Brief CGI.pm Primer |
|
|
461 | (7) |
|
8.4.3 Connecting to the MySQL Server from Web Scripts |
|
|
468 | (3) |
|
8.4.4 A Web-Based Database Browser |
|
|
471 | (4) |
|
8.4.5 A Grade-Keeping Project Score Browser |
|
|
475 | (4) |
|
8.4.6 Historical League Common-Interest Searching |
|
|
479 | (6) |
|
9 Writing MySQL Programs Using PHP |
|
|
485 | (52) |
|
|
|
487 | (22) |
|
9.1.1 A Simple PHP Script |
|
|
489 | (3) |
|
9.1.2 Using PHP Library Files for Code Encapsulation |
|
|
492 | (5) |
|
9.1.3 A Simple Data-Retrieval Page |
|
|
497 | (3) |
|
9.1.4 Processing Statement Results |
|
|
500 | (4) |
|
9.1.5 Testing for NULL Values in Query Results |
|
|
504 | (1) |
|
9.1.6 Using Prepared Statements |
|
|
505 | (1) |
|
9.1.7 Using Placeholders to Handle Data Quoting Issues |
|
|
505 | (2) |
|
|
|
507 | (2) |
|
|
|
509 | (28) |
|
9.2.1 An Online Score-Entry Application |
|
|
510 | (12) |
|
9.2.2 Creating an Interactive Online Quiz |
|
|
522 | (6) |
|
9.2.3 Historical League Online Member Entry Editing |
|
|
528 | (9) |
|
Part III MySQL Administration |
|
|
|
10 Introduction to MySQL Administration |
|
|
537 | (6) |
|
|
|
538 | (1) |
|
10.2 General MySQL Administration |
|
|
539 | (1) |
|
10.3 Access Control and Security |
|
|
540 | (1) |
|
10.4 Database Maintenance, Backups, and Replication |
|
|
540 | (3) |
|
11 The MySQL Data Directory |
|
|
543 | (20) |
|
11.1 The Data Directory Location |
|
|
544 | (1) |
|
11.2 Structure of the Data Directory |
|
|
545 | (11) |
|
11.2.1 How the MySQL Server Provides Access to Data |
|
|
546 | (1) |
|
11.2.2 Representation of Databases in the Filesystem |
|
|
547 | (1) |
|
11.2.3 Representation of Tables in the Filesystem |
|
|
548 | (1) |
|
11.2.4 Representation of Views and Triggers in the Filesystem |
|
|
549 | (1) |
|
11.2.5 How SQL Statements Map onto Table File Operations |
|
|
549 | (1) |
|
11.2.6 Operating System Constraints on Database Object Names |
|
|
550 | (1) |
|
11.2.7 Factors That Affect Maximum Table Size |
|
|
551 | (2) |
|
11.2.8 Implications of Data Directory Structure for System Performance |
|
|
553 | (1) |
|
11.2.9 MySQL Status and Log Files |
|
|
554 | (2) |
|
11.3 Relocating Data Directory Contents |
|
|
556 | (7) |
|
11.3.1 Relocation Methods |
|
|
557 | (1) |
|
11.3.2 Relocation Precautions |
|
|
558 | (1) |
|
11.3.3 Assessing the Effect of Relocation |
|
|
558 | (1) |
|
11.3.4 Relocating the Entire Data Directory |
|
|
559 | (1) |
|
11.3.5 Relocating Individual Databases |
|
|
559 | (1) |
|
11.3.6 Relocating Individual Tables |
|
|
560 | (1) |
|
11.3.7 Relocating the InnoDB System Tablespace |
|
|
561 | (1) |
|
11.3.8 Relocating Status and Log Files |
|
|
561 | (2) |
|
12 General MySQL Administration |
|
|
563 | (82) |
|
12.1 Securing a New MySQL Installation |
|
|
564 | (6) |
|
12.1.1 Establishing Passwords for the Initial MySQL Accounts |
|
|
564 | (5) |
|
12.1.2 Setting Up Passwords for Additional Servers |
|
|
569 | (1) |
|
12.2 Arranging for MySQL Server Startup and Shutdown |
|
|
570 | (13) |
|
12.2.1 Running the MySQL Server On Unix |
|
|
570 | (5) |
|
12.2.2 Running the MySQL Server On Windows |
|
|
575 | (2) |
|
12.2.3 Specifying Server Startup Options |
|
|
577 | (2) |
|
12.2.4 Controlling How the Server Listens for Connections |
|
|
579 | (1) |
|
12.2.5 Stopping the Server |
|
|
580 | (1) |
|
12.2.6 Regaining Control of the Server When You Cannot Connect to It |
|
|
581 | (2) |
|
12.3 Using System and Status Variables |
|
|
583 | (6) |
|
12.3.1 Checking and Setting System Variable Values |
|
|
584 | (4) |
|
12.3.2 Checking Status Variable Values |
|
|
588 | (1) |
|
12.4 The Plugin Interface |
|
|
589 | (4) |
|
12.5 Storage Engine Configuration |
|
|
593 | (8) |
|
12.5.1 Selecting Storage Engines |
|
|
593 | (1) |
|
12.5.2 Selecting a Default Storage Engine |
|
|
594 | (1) |
|
12.5.3 Configuring the InnoDB Storage Engine |
|
|
594 | (7) |
|
12.6 Globalization Issues |
|
|
601 | (4) |
|
12.6.1 Configuring Time Zone Support |
|
|
601 | (2) |
|
12.6.2 Selecting the Default Character Set and Collation |
|
|
603 | (1) |
|
12.6.3 Selecting the Language for Error Messages |
|
|
604 | (1) |
|
12.6.4 Selecting the Locale |
|
|
604 | (1) |
|
|
|
605 | (12) |
|
12.7.1 General-Purpose System Variables for Server Tuning |
|
|
606 | (3) |
|
12.7.2 Storage Engine Tuning |
|
|
609 | (5) |
|
12.7.3 Using the Query Cache |
|
|
614 | (2) |
|
12.7.4 Hardware Optimizations |
|
|
616 | (1) |
|
|
|
617 | (15) |
|
|
|
620 | (1) |
|
12.8.2 The General Query Log |
|
|
621 | (1) |
|
12.8.3 The Slow Query Log |
|
|
621 | (1) |
|
|
|
622 | (2) |
|
|
|
624 | (1) |
|
|
|
624 | (1) |
|
|
|
625 | (7) |
|
12.9 Running Multiple Servers |
|
|
632 | (10) |
|
12.9.1 General Multiple Server Issues |
|
|
632 | (3) |
|
12.9.2 Configuring and Compiling Different Servers |
|
|
635 | (1) |
|
12.9.3 Strategies for Specifying Startup Options |
|
|
636 | (1) |
|
12.9.4 Using mysqld_multi for Server Management |
|
|
637 | (2) |
|
12.9.5 Running Multiple Servers on Windows |
|
|
639 | (2) |
|
12.9.6 Running Clients of Multiple Servers |
|
|
641 | (1) |
|
|
|
642 | (3) |
|
13 Security and Access Control |
|
|
645 | (54) |
|
13.1 Securing Filesystem Access to MySQL |
|
|
646 | (8) |
|
|
|
647 | (1) |
|
13.1.2 Securing Your MySQL Installation |
|
|
648 | (6) |
|
13.2 Managing MySQL User Accounts |
|
|
654 | (25) |
|
13.2.1 High-Level MySQL Account Management |
|
|
655 | (5) |
|
13.2.2 Granting Privileges |
|
|
660 | (11) |
|
13.2.3 Displaying Account Privileges |
|
|
671 | (1) |
|
13.2.4 Revoking Privileges |
|
|
671 | (1) |
|
13.2.5 Changing Passwords or Resetting Lost Passwords |
|
|
672 | (1) |
|
13.2.6 Avoiding Access-Control Risks |
|
|
673 | (3) |
|
13.2.7 Pluggable Authentication and Proxy Users |
|
|
676 | (3) |
|
13.3 Grant Table Structure and Contents |
|
|
679 | (7) |
|
13.3.1 Grant Table Scope-of-Access Columns |
|
|
683 | (1) |
|
13.3.2 Grant Table Privilege Columns |
|
|
683 | (1) |
|
13.3.3 Grant Table Authentication Columns |
|
|
684 | (1) |
|
13.3.4 Grant Table SSL-Related Columns |
|
|
685 | (1) |
|
13.3.5 Grant Table Resource Management Columns |
|
|
685 | (1) |
|
13.4 How the Server Controls Client Access |
|
|
686 | (8) |
|
13.4.1 Scope Column Contents |
|
|
687 | (2) |
|
13.4.2 Statement Access Verification |
|
|
689 | (1) |
|
13.4.3 Scope Column Matching Order |
|
|
690 | (1) |
|
13.4.4 A Privilege Puzzle |
|
|
691 | (3) |
|
13.5 Setting Up Secure Connections Using SSL |
|
|
694 | (5) |
|
14 Database Maintenance, Backups, and Replication |
|
|
699 | (36) |
|
14.1 Principles of Preventive Maintenance |
|
|
699 | (2) |
|
14.2 Performing Database Maintenance with the Server Running |
|
|
701 | (4) |
|
14.2.1 Locking Individual Tables for Read-Only or Read/Write Access |
|
|
702 | (3) |
|
14.2.2 Locking All Databases for Read-Only Access |
|
|
705 | (1) |
|
14.3 General Preventive Maintenance |
|
|
705 | (2) |
|
14.3.1 Using the Server's Auto-Recovery Capabilities |
|
|
706 | (1) |
|
14.3.2 Scheduling Preventive Maintenance |
|
|
706 | (1) |
|
14.4 Making Database Backups |
|
|
707 | (9) |
|
14.4.1 Storage Engine Portability Characteristics |
|
|
709 | (2) |
|
14.4.2 Making Text Backups with mysqldump |
|
|
711 | (3) |
|
14.4.3 Making Binary Database Backups |
|
|
714 | (1) |
|
14.4.4 Backing Up InnoDB Tables |
|
|
715 | (1) |
|
14.5 Copying Databases to Another Server |
|
|
716 | (2) |
|
14.5.1 Copying Databases Using a Backup File |
|
|
716 | (1) |
|
14.5.2 Copying Databases from One Server to Another |
|
|
717 | (1) |
|
14.6 Checking and Repairing Database Tables |
|
|
718 | (4) |
|
14.6.1 Checking Tables with CHECK TABLE |
|
|
719 | (1) |
|
14.6.2 Repairing Tables with REPAIR TABLE |
|
|
720 | (1) |
|
14.6.3 Using mysqlcheck to Check and Repair Tables |
|
|
720 | (2) |
|
14.7 Using Backups for Data Recovery |
|
|
722 | (4) |
|
14.7.1 Recovering Entire Databases |
|
|
722 | (1) |
|
14.7.2 Recovering Individual Tables |
|
|
723 | (1) |
|
14.7.3 Re-Executing Statements in Binary Log Files |
|
|
723 | (2) |
|
14.7.4 Coping with InnoDB Auto-Recovery Problems |
|
|
725 | (1) |
|
14.8 Setting Up Replication Servers |
|
|
726 | (9) |
|
14.8.1 How Replication Works |
|
|
727 | (1) |
|
14.8.2 Establishing a Master-Slave Replication Relationship |
|
|
728 | (3) |
|
14.8.3 Binary Logging Formats |
|
|
731 | (1) |
|
14.8.4 Using a Replication Slave for Making Backups |
|
|
731 | (4) |
|
|
|
|
A Software Required to Use This Book |
|
|
735 | (12) |
|
A.1 Obtaining the sampdb Sample Database Distribution |
|
|
735 | (1) |
|
A.2 Obtaining MySQL and Related Software |
|
|
736 | (1) |
|
A.3 MySQL Installation Notes |
|
|
737 | (6) |
|
A.3.1 Creating a Login Account for the MySQL User |
|
|
738 | (1) |
|
|
|
739 | (1) |
|
A.3.3 Setting Your PATH Environment Variable |
|
|
739 | (1) |
|
A.3.4 Initializing the Data Directory and Grant Tables |
|
|
740 | (1) |
|
A.3.5 Starting the Server |
|
|
741 | (1) |
|
A.3.6 Initializing Other System Tables |
|
|
742 | (1) |
|
A.4 Perl DBI Installation Notes |
|
|
743 | (1) |
|
A.5 PHP and PDO Installation Notes |
|
|
743 | (4) |
|
|
|
747 | (16) |
|
|
|
748 | (5) |
|
|
|
749 | (2) |
|
|
|
751 | (1) |
|
B.1.3 Floating-Point Types |
|
|
751 | (1) |
|
|
|
752 | (1) |
|
|
|
753 | (6) |
|
B.2.1 Binary String Types |
|
|
755 | (1) |
|
B.2.2 Nonbinary String Types |
|
|
756 | (2) |
|
|
|
758 | (1) |
|
B.3 Temporal (Date and Time) Types |
|
|
759 | (4) |
|
C Operator and Function Reference |
|
|
763 | (72) |
|
|
|
764 | (16) |
|
C.1.1 Operator Precedence |
|
|
764 | (1) |
|
|
|
765 | (1) |
|
C.1.3 Arithmetic Operators |
|
|
766 | (2) |
|
C.1.4 Comparison Operators |
|
|
768 | (5) |
|
|
|
773 | (1) |
|
|
|
774 | (1) |
|
|
|
775 | (1) |
|
C.1.8 Pattern-Matching Operators |
|
|
776 | (4) |
|
|
|
780 | (55) |
|
C.2.1 Comparison Functions |
|
|
781 | (2) |
|
|
|
783 | (1) |
|
|
|
784 | (5) |
|
|
|
789 | (13) |
|
C.2.5 Date and Time Functions |
|
|
802 | (15) |
|
|
|
817 | (4) |
|
C.2.7 Security and Compression Functions |
|
|
821 | (3) |
|
C.2.8 Advisory Locking Functions |
|
|
824 | (2) |
|
C.2.9 IP Address Functions |
|
|
826 | (2) |
|
|
|
828 | (1) |
|
|
|
828 | (1) |
|
C.2.12 Miscellaneous Functions |
|
|
829 | (6) |
|
D System, Status, and User Variable Reference |
|
|
835 | (62) |
|
|
|
835 | (46) |
|
D.1.1 InnoDB System Variables |
|
|
870 | (11) |
|
|
|
881 | (13) |
|
D.2.1 InnoDB Status Variables |
|
|
888 | (3) |
|
D.2.2 Query Cache Status Variables |
|
|
891 | (1) |
|
D.2.3 SSL Status Variables |
|
|
892 | (2) |
|
D.3 User-Defined Variables |
|
|
894 | (3) |
|
|
|
897 | (102) |
|
E.1 SQL Statement Syntax (Noncompound Statements) |
|
|
898 | (89) |
|
E.2 SQL Statement Syntax (Compound Statements) |
|
|
987 | (9) |
|
E.2.1 Control Structure Statements |
|
|
987 | (2) |
|
E.2.2 Declaration Statements |
|
|
989 | (2) |
|
|
|
991 | (1) |
|
E.2.4 Condition-Handling Statements |
|
|
992 | (4) |
|
|
|
996 | (3) |
|
F MySQL Program Reference |
|
|
999 | (74) |
|
F.1 Displaying a Program's Help Message |
|
|
1000 | (1) |
|
F.2 Specifying Program Options |
|
|
1001 | (12) |
|
F.2.1 Standard MySQL Program Options |
|
|
1003 | (4) |
|
|
|
1007 | (4) |
|
F.2.3 Environment Variables |
|
|
1011 | (2) |
|
|
|
1013 | (6) |
|
F.3.1 Standard Options Supported by myisamchk |
|
|
1014 | (1) |
|
F.3.2 Options Specific to myisamchk |
|
|
1015 | (3) |
|
F.3.3 Variables for myisamchk |
|
|
1018 | (1) |
|
|
|
1019 | (11) |
|
F.4.1 Standard Options Supported by mysql |
|
|
1021 | (1) |
|
F.4.2 Options Specific to mysql |
|
|
1021 | (4) |
|
F.4.3 Variables for mysql |
|
|
1025 | (1) |
|
|
|
1026 | (2) |
|
F.4.5 Mysql Prompt Definition Sequences |
|
|
1028 | (2) |
|
|
|
1030 | (1) |
|
F.5.1 Options Supported by mysql.server |
|
|
1030 | (1) |
|
|
|
1030 | (1) |
|
F.6.1 Options Specific to mysql_config |
|
|
1031 | (1) |
|
|
|
1031 | (2) |
|
F.7.1 Standard Options Supported by mysql_install_db |
|
|
1032 | (1) |
|
F.7.2 Options Specific to mysql_install_db |
|
|
1032 | (1) |
|
|
|
1033 | (1) |
|
F.8.1 Standard Options Supported by mysql_upgrade |
|
|
1033 | (1) |
|
F.8.2 Options Specific to mysql_upgrade |
|
|
1033 | (1) |
|
|
|
1034 | (4) |
|
F.9.1 Standard Options Supported by mysqladmin |
|
|
1034 | (1) |
|
F.9.2 Options Specific to mysqladmin |
|
|
1034 | (1) |
|
F.9.3 Variables for mysqladmin |
|
|
1035 | (1) |
|
F.9.4 Mysqladmin Commands |
|
|
1035 | (3) |
|
|
|
1038 | (3) |
|
F.10.1 Standard Options Supported by mysqlbinlog |
|
|
1038 | (1) |
|
F.10.2 Options Specific to mysqlbinlog |
|
|
1038 | (3) |
|
F.10.3 Variables for mysqlbinlog |
|
|
1041 | (1) |
|
|
|
1041 | (4) |
|
F.11.1 Standard Options Supported by mysqlcheck |
|
|
1042 | (1) |
|
F.11.2 Options Specific to mysqlcheck |
|
|
1042 | (3) |
|
|
|
1045 | (11) |
|
F.12.1 Standard Options Supported by mysqld |
|
|
1046 | (1) |
|
F.12.2 Options Specific to mysqld |
|
|
1046 | (10) |
|
F.12.3 Variables for mysqld |
|
|
1056 | (1) |
|
|
|
1056 | (2) |
|
F.13.1 Standard Options Supported by mysqld_multi |
|
|
1057 | (1) |
|
F.13.2 Options Specific to mysqld_multi |
|
|
1057 | (1) |
|
|
|
1058 | (2) |
|
F.14.1 Standard Options Supported by mysqld_safe |
|
|
1058 | (1) |
|
F.14.2 Options Specific to mysqld_safe |
|
|
1058 | (2) |
|
|
|
1060 | (8) |
|
F.15.1 Standard Options Supported by mysqldump |
|
|
1060 | (1) |
|
F.15.2 Options Specific to mysqldump |
|
|
1061 | (6) |
|
F.15.3 Data Format Options for mysqldump |
|
|
1067 | (1) |
|
F.15.4 Variables for mysqldump |
|
|
1068 | (1) |
|
|
|
1068 | (2) |
|
F.16.1 Standard Options Supported by mysqlimport |
|
|
1068 | (1) |
|
F.16.2 Options Specific to mysqlimport |
|
|
1069 | (1) |
|
F.16.3 Data Format Options for mysqlimport |
|
|
1070 | (1) |
|
|
|
1070 | (2) |
|
F.17.1 Standard Options Supported by mysqlshow |
|
|
1071 | (1) |
|
F.17.2 Options Specific to mysqlshow |
|
|
1071 | (1) |
|
|
|
1072 | (1) |
|
F.18.1 Standard Options Supported by perror |
|
|
1072 | (1) |
|
|
|
1073 | (56) |
|
G.1 Compiling and Linking |
|
|
1074 | (1) |
|
G.2 C API Data Structures |
|
|
1075 | (13) |
|
|
|
1075 | (1) |
|
G.2.2 Nonscalar Data Structures |
|
|
1076 | (11) |
|
|
|
1087 | (1) |
|
|
|
1088 | (41) |
|
G.3.1 Client Library Initialization and Termination Routines |
|
|
1088 | (1) |
|
G.3.2 Connection Management Routines |
|
|
1089 | (12) |
|
G.3.3 Error-Reporting Routines |
|
|
1101 | (1) |
|
G.3.4 Statement Construction and Execution Routines |
|
|
1102 | (2) |
|
G.3.5 Result Set Processing Routines |
|
|
1104 | (9) |
|
G.3.6 Multiple Result Set Routines |
|
|
1113 | (1) |
|
G.3.7 Information Routines |
|
|
1113 | (3) |
|
G.3.8 Transaction Control Routines |
|
|
1116 | (1) |
|
G.3.9 Prepared Statement Routines |
|
|
1116 | (9) |
|
G.3.10 Administrative Routines |
|
|
1125 | (1) |
|
G.3.11 Threaded Client Routines |
|
|
1126 | (1) |
|
G.3.12 Debugging Routines |
|
|
1127 | (2) |
|
|
|
1129 | (28) |
|
|
|
1130 | (1) |
|
|
|
1130 | (18) |
|
|
|
1132 | (5) |
|
H.2.2 Database-Handle Methods |
|
|
1137 | (5) |
|
H.2.3 Statement-Handle Methods |
|
|
1142 | (4) |
|
H.2.4 General Handle Methods |
|
|
1146 | (1) |
|
H.2.5 MySQL-Specific Administrative Methods |
|
|
1147 | (1) |
|
H.3 DBI Utility Functions |
|
|
1148 | (1) |
|
|
|
1149 | (7) |
|
H.4.1 Database-Handle Attributes |
|
|
1149 | (1) |
|
H.4.2 General Handle Attributes |
|
|
1149 | (1) |
|
H.4.3 MySQL-Specific Database-Handle Attributes |
|
|
1150 | (2) |
|
H.4.4 Statement-Handle Attributes |
|
|
1152 | (2) |
|
H.4.5 MySQL-Specific Statement-Handle Attributes |
|
|
1154 | (1) |
|
|
|
1155 | (1) |
|
H.5 DBI Environment Variables |
|
|
1156 | (1) |
|
|
|
1157 | (18) |
|
|
|
1157 | (1) |
|
|
|
1158 | (1) |
|
|
|
1159 | (16) |
|
|
|
1159 | (7) |
|
I.3.2 PDOStatement Object Methods |
|
|
1166 | (6) |
|
I.3.3 PDOException Object Methods |
|
|
1172 | (1) |
|
|
|
1173 | (2) |
| Index |
|
1175 | |