MySQL Books

DuBois, P. (2005) MySQL: the Definitive Guide to Using, Programming, and Administering MySQL 4.1 and 5.0 (Developer’s Library), Third Edition, Sams Publishing

A newer edition of this book is available

For years, MySQL has been helping MySQL developers and database administrators learn their MySQL system inside and out. This newest edition has been updated to include information on MySQL 5 and it will prove itself again to you as being the most definitive reference guide to using, administering and programming MySQL databases. You’ll learn everything from the basics to using MySQL to generate dynamic web pages to administering MySQL servers. This edition has been reviewed by the top developers in the MySQL community and the changes reflect their feedback, as well as the feedback of many other readers, and it has turned out to be the most comprehensive, thorough edition of MySQL to date. Don’t go to work without it!

  1. Introduction.
  2. Why Choose MySQL?
  3. Already Running Another RDBMS?
  4. Tools Provided with MySQL.
  5. What You Can Expect from This Book.
  6. Road Map to This Book.
  7. Part I: General MySQL Use.
  8. Part II: Using MySQL Programming Interfaces.
  9. Part III: MySQL Administration.
  10. Part IV: Appendixes.
  11. How to Read This Book.
  12. Versions of Software Covered in This Book.
  13. Conventions Used in This Book.
  14. Additional Resources.
  15. 1. Getting Started with MySQL and SQL.
  16. How MySQL Can Help You.
  17. A Sample Database.
  18. The U.S. Historical League.
  19. The Grade-Keeping Project.
  20. How the Sample Database Applies to You.
  21. Basic Database Terminology.
  22. Structural Terminology.
  23. Query Language Terminology.
  24. MySQL Architectural Terminology.
  25. A MySQL Tutorial.
  26. Obtaining the Sample Database Distribution.
  27. Preliminary Requirements.
  28. Establishing and Terminating Connections to the MySQL Server.
  29. Executing SQL Statements.
  30. Creating a Database.
  31. Creating Tables.
  32. Adding New Records.
  33. Resetting the sampdb Database to a Known State.
  34. Retrieving Information.
  35. Deleting or Updating Existing Records.
  36. Tips for Interacting with mysql.
  37. Simplifying the Connection Process.
  38. Issuing Statements with Less Typing.
  39. Where to Now?
  40. 2. MySQL SQL Syntax and Use.
  41. MySQL Naming Rules.
  42. Referring to Elements of Databases.
  43. Case Sensitivity in SQL Statements.
  44. The Server SQL Mode.
  45. Character Set Support.
  46. Character Set Support Before MySQL 4.amp;nbsp; Obtaining and Installing a MySQL Distribution on Unix.
  47. Post-Installation Steps.
  48. Installing Perl DBI Support on Unix.
  49. Installing Apache and PHP on Unix.
  50. Installing MySQL on Windows.
  51. Installing Perl DBI Support on Windows.
  52. Installing Apache and PHP on Windows.
  53. Installing Connector/ODBC on Windows.
  54. Appendix B. Data Type Reference.
  55. Numeric Types.
  56. Integer Types.
  57. Floating-Point Types.
  58. Fixed-Point Type.
  59. BIT Type.
  60. String Types.
  61. Binary String Types.
  62. Non-Binary String Types.
  63. ENUM and SET Types.
  64. Date and Time Types.
  65. Spatial Types.
  66. Appendix C. Operator and Function Reference.
  67. Operators.
  68. Operator Precedence.
  69. Grouping Operators.
  70. Arithmetic Operators.
  71. Comparison Operators.
  72. Bit Operators.
  73. Logical Operators.
  74. Cast Operators.
  75. Pattern-Matching Operators.
  76. Functions.
  77. Comparison Functions.
  78. Cast Functions.
  79. Numeric Functions.
  80. String Functions.
  81. Date and Time Functions.
  82. Summary Functions.
  83. Security and Compression Functions.
  84. Advisory Locking Functions.
  85. Spatial Functions.
  86. Miscellaneous Functions.
  87. Appendix D. System, Status, and User Variable Reference.
  88. System Variables.
  89. Session-Only System Variables.
  90. Status Variables.
  91. Statement Counter Status Variables.
  92. InnoDB Status Variables.
  93. Query Cache Status Variables.
  94. SSL Status Variables.
  95. User-Defined Variables.
  96. Appendix E. SQL Syntax Reference.
  97. SQL Statement Syntax.
  98. Stored Routine Syntax.
  99. Control Structure Statements.
  100. Declaration Statements.
  101. Cursor Statements.
  102. Comment Syntax.
  103. Appendix F. MySQL Program Reference.
  104. Specifying Program Options.
  105. Program Option Conventions.
  106. Standard MySQL Program Options.
  107. Option Files.
  108. Environment Variables.
  109. libmysqld.
  110. myisamchk.
  111. Usage.
  112. Standard Options Supported by myisamchk.
  113. Options Specific to myisamchk.
  114. Variables for myisamchk.
  115. myisampack.
  116. Usage.
  117. Standard Options Supported by myisampack.
  118. Options Specific to myisampack.
  119. mysql.
  120. Usage.
  121. Standard Options Supported by mysql.
  122. Options Specific to mysql.
  123. Variables for mysql.
  124. mysql Commands.
  125. mysql Prompt Definition Sequences.
  126. mysql.server.
  127. Usage.
  128. Standard Options Supported by mysql.server.
  129. mysql_config.
  130. Usage.
  131. Options Specific to mysql_config.
  132. mysql_install_db.
  133. Usage.
  134. Options Specific to mysql_install_db.
  135. mysqladmin.
  136. Usage.
  137. Standard Options Supported by mysqladmin.
  138. Options Specific to mysqladmin.
  139. Variables for mysqladmin.
  140. mysqladmin Commands.
  141. mysqlbinlog.
  142. Usage.
  143. Standard Options Supported by mysqlbinlog.
  144. Options Specific to mysqlbinlog.
  145. Variables for mysqlbinlog.
  146. mysqlcheck.
  147. Usage.
  148. Standard Options Supported by mysqlcheck.
  149. Options Specific to mysqlcheck.
  150. mysqld.
  151. Usage.
  152. Standard Options Supported by mysqld.
  153. Options Specific to mysqld.
  154. Variables for mysqld.
  155. mysqld_multi.
  156. Usage.
  157. Standard Options Supported by mysqld_multi.
  158. Options Specific to mysqld_multi.
  159. mysqld_safe.
  160. Usage.
  161. Options Specific to mysqld_safe.
  162. Upgrading Tips.
  163. mysqldump.
  164. Usage.
  165. Standard Options Supported by mysqldump.
  166. Options Specific to mysqldump.
  167. Data Format Options for mysqldump.
  168. Variables for mysqldump.
  169. mysqlhotcopy.
  170. Usage.
  171. Standard Options Supported by mysqlhotcopy.
  172. Options Specific to mysqlhotcopy.
  173. mysqlimport.
  174. Usage.
  175. Standard Options Supported by mysqlimport.
  176. Options Specific to mysqlimport.
  177. Data Format Options for mysqlimport.
  178. mysqlshow.
  179. Usage.
  180. Standard Options Supported by mysqlshow.
  181. Options Specific to mysqlshow.
  182. perror.
  183. Usage.
  184. Standard Options Supported by perror.
  185. Appendix G. C API Reference.
  186. Compiling and Linking.
  187. C API Data Types.
  188. Scalar Data Types.
  189. Non-Scalar Data Types.
  190. Accessor Macros.
  191. C API Functions.
  192. Connection Management Routines.
  193. Error-Reporting Routines.
  194. Statement Construction and Execution Routines.
  195. Result Set Processing Routines.
  196. Information Routines.
  197. Transaction Control Routines.
  198. Multiple Result Set Routines.
  199. Prepared Statement Routines.
  200. Administrative Routines.
  201. Threaded Client Routines.
  202. Embedded Server Communication Routines.
  203. Debugging Routines.
  204. Appendix H. Perl DBI API Reference.
  205. Writing Scripts.
  206. DBI Methods.
  207. DBI Class Methods.
  208. Database Handle Methods.
  209. Statement Handle Methods.
  210. General Handle Methods.
  211. MySQL-Specific Administrative Methods.
  212. DBI Utility Functions.
  213. DBI Attributes.
  214. Database Handle Attributes.
  215. General Handle Attributes.
  216. MySQL-Specific Database Handle Attributes.
  217. Statement Handle Attributes.
  218. MySQL-Specific Statement Handle Attributes.
  219. Dynamic Attributes.
  220. DBI Environment Variables.
  221. Appendix I. PHP and PEAR DB API Reference.
  222. Writing PHP Scripts.
  223. PEAR DB Module Classes.
  224. PEAR DB Module Methods.
  225. DB Class Methods.
  226. DB_common Object Methods.
  227. DB_result Object Methods.
  228. DB_Error Object Methods.
  229. Index.

Meloni, J. C. (2002) Sams Teach Yourself MySQL in 24 Hours, Sams Publishing

Sams Teach Yourself MySQL in 24 Hours teaches the reader everything from basic installation to using MySQL in Web application development.

First, the basic concepts of database design are taught, and then the reader jumps right into planning and creating a database. The book then walks the reader through all the basics of using MySQL – working with tables and data, using MySQL’s query functions, using transactions, and database administration – before the reader finally learns to put everything together to properly create the foundation database for a Web-based application.

Table of Contents

(NOTE: Each chapter concludes with a Summary, Q&A, and Workshop.)

Introduction.

I. INTRODUCTION TO MYSQL AND RELATIONAL DATABASES.

Hour 1. Introducing MySQL.
What Is a Relational Database? What Is MySQL? Communicating with MySQL.Hour 2. Understanding Database Terminology.
Basic Elements Explained.Hour 3. Learning the Database Design Process.
The Importance of Good Database Design. Types of Table Relationships. Understanding Normalization. Following the Design Process.II. SETTING UP YOUR ENVIRONMENT.

Hour 4. Using the MySQL Client.
Working with the MySQL Command-Line Interface. Working with the MySQL Administration Tools. Other Interfaces to MySQL.Hour 5. Securing MySQL.
Basic Security Guidelines. Introducing the MySQL Privilege System. Working with User Provileges.III. LEARNING TO PLAN FOR YOUR DATABASE-DRIVEN APPLICATIONS.

Hour 6. Planning and Creating Your Database.
Determine Your Goals. Conceptualize the Tables. Creating the Database.Hour 7. Creating Your Database Tables-Part I.
Learning the MySQL Data Types. Learning the Table Creation Syntax.Hour 8. Creating Your Database Tables-Part II.
Identifying Keys in Your Tables. Adding Indexes to Your Tables. When to Use, or Not to Use, Keys and Indexes. Finalizing Your Table Creation Statements. Issuing Your Table Creation Statements.IV. WORKING WITH YOUR TABLES.

Hour 9. Populating Your Database Tables.
Using the INSERT Command. Importing Data from Other Databases.Hour 10. Selecting Data from Your Tables.
Using the SELECT Command. Using WHERE in Your Queries. Using Operators in WHERE Clauses. String Comparison Using LIKE.Hour 11. Advanced Usage of SELECT Statements.
Using the GROUP BY Clause. Using SELECT Within INSERT Statements. Selecting from Multiple Tables. Using JOIN.Hour 12. Modifying and Deleting Data.
Using the UPDATE Command to Modify Records. Using the REPLACE Command. Using the DELETE Command.Hour 13. More About DELETE.
Deleting Related Records. Listing Tables and Databases Before Deleting Them. Using the DROP Command.Hour 14. Modifying Table Structure.
Using DESCRIBE to View Table Structure. Renaming Tables. Using the ALTER Command.V. USING BUILT-IN FUNCTIONS IN MYSQL QUERIES.

Hour 15. Using MySQL String Functions.
Frequently Used String Functions. Obscure String Functions.Hour 16. Using MySQL Numeric Functions.
Using Numeric Functions in Queries.Hour 17. Using MySQL Date and Time Functions.
Using Date and Time Functions in Queries. Formatting Dates and Times. Performing Date Arithmetic. Special Functions and Conversion Features.VI. USING TRANSACTIONS.

Hour 18. Transactions Overview.
What Are Transactions? Transaction-Safe Table Types in MySQL.Hour 19. Practical Transaction Usage.
Converting Tables to Transaction-Safe Table Types. Using Transactions in Your Applications.VII. ADMINISTERING YOUR MYSQL SERVER.

Hour 20. Optimizing and Tuning Your Database.
Building an Optimized Platform. MySQL Startup Options. Optimizing Your Table Structure. Optimizing Your Queries.Hour 21. Backing Up and Restoring Your Database.
Database Backup Overview. Using mysqlhotcopy. Using the BACKUP TABLE and RESTORE TABLE Commands. Using myisamchk.Hour 22. Basic Administrative Commands.
Using the FLUSH Command. Using the SHOW Command.VIII. INTERFACING WITH MYSQL.

Hour 23. Using MySQL with Perl.
Getting Access to Perl. Connecting to MySQL with Perl. Executing Queries. Working with MySQL Data.Hour 24. Using MySQL with PHP.
Getting Access to PHP. How PHP Works. Connecting to MySQL with PHP. Working with MySQL Data.IX. APPENDICES.

Appendix A. Installing MySQL.
How to Get MySQL. Installing MySQL 3.23 or 4.0 on Windows. Installing MySQL 3.23 or 4.0 on Linux/UNIX. Troubleshooting Your Installation.Appendix B. Using MyODBC.
Installing MyODBC on Windows. Configuring MyODBC. Importing/Exporting Data with MysQL and Microsoft Access.Appendix C. Reserved Words.
Appendix D. Practical MySQL/PHP Examples.
Creating Access Logs and Reports. Creating an Online Poll. Storing Uploaded Files in Your Database. Retrieving Images Files from Your Database.


Ullman, L. (2006) Visual QuickStart Guide MySQL, Second Edition, Peachpit Press

Even if you’ve never used MySQL before, this Visual QuickStart Guide will have you up and running with the world’s most popular open source database application in no time. In this completely updated edition of our best-selling guide to MySQL, leading technology authorLarry Ullman uses his trademark crystal-clear instructions and friendly prose to introduce you to everything that’s new in MySQL. Filled with step-by-step, task-based instructions and loads of visual aids, this book explains how to interact with MySQL using SQL, the language common to all databases. The interface examples show how to use MySQL’s own tools and how to use three popular programming languages (PHP, Perl, and Java). The book covers MySQL versions 3 and 4, as well as everything new in the eagerly anticipated version 5. Along the way, you’ll find extensive coverage of MySQL installation, administration, database design, as well as its use with various programming languages, database programming techniques, utilities, advanced MySQL and SQL, and more!

•    Takes an easy, visual approach to teaching MySQL, using pictures to guide you through the software and show you what to do.
•    Works like a reference book―you look up what you need and then get straight to work.
•    No long-winded passages―concise, straightforward commentary explains what you need to know.
•    Affordably priced, because buying a computer book shouldn’t be an investment in itself.
•    Companion Web site at www.DMCInsights.com/mysql2 contains complete source code for examples in the book, online resources, extra scripts and tutorials, updates, a reader forum, and more.

  • Introduction
  • Chapter 1: Installing MySQL
    • General Installation Steps
    • Installing MySQL on Windows
    • Configuring MySQL on Windows
    • Installing MySQL on Macintosh
    • Installing MySQL on Linux
    • Basic Configuration Options
    • Upgrading MySQL
  • Chapter 2: Running MySQL
    • Running MySQL on Windows and Windows NT
    • Running MySQL on Mac OS X
    • Running MySQL on Linux and Unix
    • Using mysqladmin
    • Setting the Root User Password
    • Using the mysql Client
    • Users and Privileges
  • Chapter 3: Database Design
    • Normalization
    • Understanding Keys
    • Understanding Relationships
    • First Normal Form
    • Second Normal Form
    • Third Normal Form
  • Chapter 4: Creating a MySQL Database
    • MySQL Data Types
    • Extra Column Characteristics
    • Introduction to Indexes
    • Finalizing a Table’s Design
    • Choosing a Storage Engine
    • Character Sets and Collations
    • Creating Databases
    • Creating Tables
    • Modifying Tables
  • Chapter 5: Basic SQL
    • Using Values in Queries
    • Inserting Dtaa
    • Selecting Data
    • Using Conditionals
    • Using LIKE and NOT LIKE
    • Performing Joins
    • Sorting Query Results
    • Limiting Query Results
    • Updating Data
    • Deleting Data
  • Chapter 6: MySQL Functions
    • Text Functions
    • Concatenation and Aliases
    • Numeric Functions
    • Date and Time Functions
    • Formatting the Date and Time
    • Encryption Functions
    • Grouping Functions
    • Other Functions
  • Chapter 7: MySQL and PHP
    • Connecting to MySQL and Selecting a Database
    • Executing Simple Queries
    • Retrieving Query Results
    • Using mysql_insert_id()
    • Error Handling
    • Security Considerations
  • Chapter 8: MySQL and Perl
    • Installing Perl with MySQL Support on Windows
    • Installing Perl Support for MySQL on Unix and Mac OS X
    • Testing Perl and MySQL
    • Connecting to MySQL
    • Retrieving Query Results
    • Executing Simple Queries
    • Retrieving the Insert ID
    • Error Handling
    • Security Considerations
    • Using Prepared Statements
  • Chapter 9: MySQL and Java
    • Installing Java Support for MySQL
    • Connecting to the Database
    • Executing Simple Queries
    • Retrieving Query Results
    • Retrieving the Insert ID
    • Using Prepared Statements
  • Chapter 10: Advanced SQL and MySQL
    • Performing Transactions
    • Full-Text Searching
    • Regular Expressions
    • User-Defined Variables
    • Introducing Unions
  • Chapter 11: MySQL 5 Features
    • Stored Routines
    • Using OUT Parameters
    • Triggers
    • Views
  • Chapter 12: Techniques for Programming
    • Storing and Retrieving Binary Data
    • Making Query Result Pages
    • Using Transactions with Perl
  • Chapter 13: MySQL Administration
    • The MySQL Administrator
    • Backing Up Databases
    • Importing Data
    • MySQL Logging
    • Database Maintenance
    • Improving Performance
    • Using Batch Files
  • Appendix A: Troubleshooting
    • Installation
    • Starting MySQL
    • Accessing MySQL
    • mysql.sock Problems
    • Queries That Return Strange Results
    • Authentication Protocol Problems
    • Resetting the Root Password
  • Appendix B: SQL and MySQL References
    • Basic SQL
    • ALTER Commands
    • SQL Clauses
    • MySQL Privileges
    • MySQL Data Types
    • MySQL Functions
    • Other References
  • Appendix C: Resources
    • MySQL-Specific
    • Third-Party MySQL Applications
    • SQL
    • PHP
    • Perl
    • Java
    • Other

 Dubois, P., Hinz, S. and Pederson, C. (2005) MySQL 5.0 Certification Study Guide, MySQL Press

This is the official guide to passing the two MySQL certification tests for MySQL 5, the long-awaited major revision of MySQL. The number of MySQL certification exams taken has doubled in the last six months.

Certcities.com lists the MySQL certification as one of the top 10 certifications to grow in 2005. MySQL professionals need a way to distinguish themselves from the vast majority of database administrators and developers. With more than 4 million active installations, MySQL is the world’s most popular open-source database. Known for its speed, reliability and case of use, MySQL has become a low-cost alternative to expensive database systems such as Oracle, IBM and Microsoft. MySQL AB has aggressively improved the feature set of MySQL with MySQL 5, making it more suitable for enterprise-level applications and uses. The MySQL certification tests, available at over 3,000 PearsonVUE testing centers, is a key component of this enterprise growth strategy, establishing a base level of skills for database users, administrators and programmers.

The MySQL Core Certification is aimed at the database user who wants proof of his or her abilities in such fundamental areas as SQL, data entry and maintenance, and data extraction. The MySQL Professional Certification test is designed for the advanced user who wants to prove his or her knowledge in such areas as database management, installation, security, disaster prevention and optimization. Both tests are thoroughly covered in the MySQL 5.0 Certification Study Guide. Written by Paul DuBois, the leading author of books on MySQL topics, and reviewed for technical accuracy by MySQL AB, this book is the fastest, most reliable way for MySQL users, developers, and administrators to prepare for either of the MySQL tests.

Table of Contents

Introduction.

About This Book.

Sample Exercises

Other Required Reading

Manuals

Sample Data

Study Guide Errata

Certification Information at www.mysql.com

The MySQL Certification Candidate Guide

The Certification Mailing List

Conventions Used in This Book

Running MySQL on Microsoft Windows

About the Exams

Registering for an Exam

Going to the Exam

Taking the Exam

Reading Questions

Answering Questions

After the Exam

Retaking Exams

Warning

Interpreting DESCRIBE Output

Sample Tables

MYSQL DEVELOPER EXAMS.

MySQL Developer I Exam.

1. Client/Server Concepts.

General MySQL Architecture

Invoking Client Programs

General Command Option Syntax

Connection Parameter Options

Using Option Files

Selecting a Default Database

Establishing a Connection with a GUI Client

Server SQL Modes

2. The mysql Client Program.

Using mysql Interactively

Statement Terminators

The mysql Prompts

Using Editing Keys in mysql

Using Script Files with mysql

mysql Output Formats

Client Commands and SQL Statements

Using Server-Side Help

Using the –safe-updates Option

3. MySQL Query Browser.

MySQL Query Browser Capabilities

Using MySQL Query Browser

Using the Query Window

Entering Queries

The Result Area

The Script Editor

Stored Routine Management

The Object and Information Browsers

The MySQL Table Editor

Connection Management

Using the Connection Dialog

Editing Connection Profiles

The Options Dialog

4. MySQL Connectors.

MySQL Client Interfaces

MySQL Connector/ODBC

MySQL Connector/J

MySQL Connector/NET

5. Data Types.

Data Type Overview

Numeric Data Types

Integer Data Types

Floating-Point Data Types

Fixed-Point Data Types

The BIT Data Type

String Data Types

Character Set Support

Non-Binary String Data Types: _CHAR, VARCHAR, TEXT

Binary String Data Types: BINARY, VARBINARY, BLOB

The ENUM and SET Data Types

Temporal Data Types

The DATE, TIME, DATETIME, and YEAR Data Types

The TIMESTAMP Data Type

Per-Connection Time Zone Support

Column Attributes

Numeric Column Attributes

String Column Attributes

General Column Attributes

Using the AUTO_INCREMENT Column Attribute

Handling Missing or Invalid Data Values

Handling Missing Values

Handling Invalid Values in Non-Strict Mode

Handling Invalid Values in Strict Mode

Enabling Additional Input Data Restrictions

Overriding Input Data Restrictions

6. Identifiers.

Identifier Syntax

Case Sensitivity of Identifiers

Using Qualified Names

Using Reserved Words as Identifiers

7. Databases.

Database Properties

Creating Databases

Altering Databases

Dropping Databases

Obtaining Database Metadata

8. Tables and Indexes.

Table Properties

Creating Tables

Creating Tables Using an Explicit Definition

Specifying the Storage Engine for a Table

Creating Tables Based on Existing Tables

Using TEMPORARY Tables

Altering Tables

Adding and Dropping Columns

Modifying Existing Columns

Renaming a Table

Specifying Multiple Table Alterations

Dropping Tables

Emptying Tables

Indexes

Types of Indexes

Creating Indexes

Choosing an Indexing Algorithm

Dropping Indexes

Obtaining Table and Index Metadata

9. Querying for Data.

Using SELECT to Retrieve Data

Specifying Which Columns to Retrieve

Renaming Retrieved Columns

Identifying the Database Containing a Table

Specifying Which Rows to Retrieve

Using ORDER BY to Sort Query Results

The Natural Sort Order of Data Types

Limiting a Selection Using LIMIT

Using DISTINCT to Eliminate Duplicates

Aggregating Results

The MIN() and MAX() Aggregate Functions

The SUM() and AVG() Aggregate Functions

The COUNT() Aggregate Function

The GROUP_CONCAT() Function

Aggregation for NULL Values or Empty Sets

Grouping Results

GROUP BY and Sorting

Selecting Groups with HAVING

Using GROUP BY and WITH ROLLUP

Using UNION

10. SQL Expressions.

Components of SQL Expressions

Numeric Expressions

String Expressions

Case Sensitivity in String Comparisons

Using LIKE for Pattern Matching

Temporal Expressions

NULL Values

Functions in SQL Expressions

Comparison Functions

Control Flow Functions

Aggregate Functions

Mathematical Functions

String Functions

Temporal Functions

NULL-Related Functions

Comments in SQL Statements

11. Updating Data.

Update Operations

The INSERT Statement

Adding Multiple Records with a Single INSERT Statement

Handling Duplicate Key Values

Using INSERT … ON DUPLICATE KEY UPDATE

The REPLACE Statement

The UPDATE Statement

Using UPDATE with ORDER BY and LIMIT

Preventing Dangerous UPDATE Statements

Multiple-Table UPDATE Statements

The DELETE and TRUNCATE TABLE Statements

Using DELETE with ORDER BY and LIMIT

Multiple-Table DELETE Statements

Privileges Required for Update Statements

MySQL Developer II Exam.

12. Joins.

Overview

Writing Inner Joins

Writing Inner Joins with the Comma Operator

Writing Inner Joins with INNER JOIN

Writing Outer Joins

Writing LEFT JOIN Queries

Writing RIGHT JOIN Queries

Resolving Name Clashes Using Qualifiers and Aliases

Qualifying Column Names

Qualifying and Aliasing Table Names

Multiple-Table UPDATE and DELETE Statements

13. Subqueries.

Types of Subqueries

Subqueries as Scalar Expressions

Correlated Subqueries

Comparing Subquery Results to Outer Query Columns

Using ALL, ANY, and SOME

Using IN

Using EXISTS

Comparison Using Row Subqueries

Using Subqueries in the FROM Clause

Converting Subqueries to Joins

Converting Subqueries to Inner Joins

Converting Subqueries to Outer Joins

Using Subqueries in Updates

14. Views.

Reasons to Use Views

Creating Views

Restrictions on Views

View Algorithms

Updatable Views

Altering Views

Dropping Views

Checking Views

Obtaining View Metadata

Privileges Required for Views

15. Importing and Exporting Data.

Import and Export Operations

Importing and Exporting Using SQL

Importing Data with LOAD DATA INFILE

Exporting Data with SELECT … INTO OUTFILE

Data File Format Specifiers

Importing and Exporting NULL Values

Importing and Exporting Data from the Command Line

Importing Data with mysqlimport

Exporting Data with mysqldump

16. User Variables.

User Variable Syntax

User Variable Properties

17. Prepared Statements.

Benefits of Prepared Statements

Using Prepared Statements from the mysql Client

Preparing a Statement

Executing a Prepared Statement

Deallocating Prepared Statements

18. Stored Procedures and Functions.

Benefits of Stored Routines

Differences Between Stored Procedures and Functions

The Namespace for Stored Routines

Defining Stored Routines

Creating Stored Routines

Compound Statements

Declaring Parameters

The DECLARE Statement

Variables in Stored Routines

Conditions and Handlers

Cursors

Retrieving Multiple Result Sets

Flow Control

Altering Stored Routines

Dropping Stored Routines

Invoking Stored Routines

Obtaining Stored Routine Metadata

Stored Routine Privileges and Execution Security

19. Triggers.

Reasons to Use Triggers

Trigger Concepts

Creating a Trigger

Restrictions on Triggers

Referring to Old and New Column Values

Destroying a Trigger

Privileges Required for Triggers

20. Obtaining Database Metadata.

Overview of Metadata Access Methods

Using INFORMATION_SCHEMA to Obtain Metadata

Using SHOW and DESCRIBE to Obtain Metadata

Using mysqlshow to Obtain Metadata

21. Debugging MySQL Applications.

Interpreting Error Messages

The SHOW WARNINGS Statement

The SHOW ERRORS Statement

The perror Utility

22. Basic Optimizations.

Overview of Optimization Principles

Using Indexes for Optimization

Types of Indexes

Principles for Index Creation

Indexing Column Prefixes

Leftmost Index Prefixes

General Query Enhancement

Query Rewriting Techniques

Using EXPLAIN to Obtain Optimizer Information

Optimizing Queries by Limiting Output

Using Summary Tables

Optimizing Updates

Choosing Appropriate Storage Engines

Normalization

MYSQL DBA EXAMS.

MySQL DBA I Exam.

23. MySQL Architecture.

Client/Server Overview

Communication Protocols

The SQL Parser and Storage Engine Tiers

How MySQL Uses Disk Space

How MySQL Uses Memory

24. Starting, Stopping, and Configuring MySQL.

Types of MySQL Distributions

MySQL Binary Distributions

MySQL Source Distributions

Starting and Stopping MySQL Server on Windows

Server Startup Prerequisites on Windows

Running MySQL Server Manually on Windows

Running MySQL Server as a Windows Service

Starting and Stopping MySQL Server on Unix

Server Startup Prerequisites on Unix

Choosing a Server Startup Method on Unix

Runtime MySQL Configuration

Log and Status Files

The General Query Log

The Binary Log

The Slow Query Log

The Error Log

Status Files

Loading Time Zone Tables

Security-Related Configuration

Setting the Default SQL Mode

Upgrading MySQL

25. Client Programs for DBA Work.

Overview of Administrative Clients

MySQL Administrator

mysql

mysqladmin

mysqlimport

mysqldump

Client Program Limitations

26. MySQL Administrator.

MySQL Administrator Capabilities

Using MySQL Administrator

Starting MySQL Administrator

Selecting an Operational Mode

Server Monitoring Capabilities

Server Information

Server Connections

Health

Server Logs

Replication Status

Catalogs

Server Configuration

Service Control

Startup Variables

User Administration

Backup and Restore Capabilities

Making Backups

Restoring Backups

MySQL Administrator System Tray Monitor

27. Character Set Support.

Performance Issues

Choosing Data Types for Character Columns

28. Locking.

Locking Concepts

Explicit Table Locking

Advisory Locking

29. Storage Engines.

MySQL Storage Engines

The MyISAM Engine

MyISAM Locking Characteristics

MyISAM Row-Storage Formats

The MERGE Engine

MERGE Locking Characteristics

The InnoDB Engine

The InnoDB Tablespace and Logs

InnoDB and ACID Compliance

The InnoDB Transaction Model

InnoDB Locking Characteristics

InnoDB Isolation Levels, Multi-Versioning, and Concurrency

Using Foreign Keys

Configuring and Monitoring InnoDB

The MEMORY Engine

MEMORY Indexing Options

The FEDERATED Engine

The Cluster Storage Engine

Other Storage Engines

30. Table Maintenance.

Types of Table Maintenance Operations

SQL Statements for Table Maintenance

CHECK TABLE

REPAIR TABLE

ANALYZE TABLE

OPTIMIZE TABLE

Client and Utility Programs for Table Maintenance

The mysqlcheck Client Program

The myisamchk Utility

Options for mysqlcheck and myisamchk

Repairing InnoDB Tables

Enabling MyISAM Auto-Repair

31. The INFORMATION_SCHEMA Database.

INFORMATION_SCHEMA Access Syntax

INFORMATION_SCHEMA Versus SHOW

Limitations of INFORMATION_SCHEMA

32. Data Backup and Recovery Methods.

Introduction

Binary Versus Textual Backups

Making Binary Backups

Making Binary MyISAM Backups

Making Binary InnoDB Backups

Other Binary Backup Tools

Conditions for Binary Portability

Making Text Backups

Making Text Backups via SQL

Making Text Backups with mysqldump

Making Text Backups with MySQL Administrator

Backing Up Log and Status Files

Replication as an Aid to Backup

MySQL Cluster as Disaster Prevention

Data Recovery

Reloading mysqldump Output

Reloading Dumps with MySQL Administrator

Processing Binary Log Contents

33. Using Stored Routines and Triggers for Administration.

Using Stored Routines and Triggers for Security Purposes

Using Stored Routines to Enhance Performance

MySQL DBA II EXAM.

34. User Management.

User Account Management

Types of Privileges That MySQL Supports

The Grant Tables

Approaches to Account Management

Creating and Dropping User Accounts

Specifying Account Names

Granting Privileges

Revoking Privileges

Changing Account Passwords

When Privilege Changes Take Effect

Specifying Resource Limits

Privileges Needed for Account Management

Client Access Control

Connection Request Checking

Statement Privilege Checking

Resource Limit Checking

Disabling Client Access Control

35. Securing the MySQL Installation.

Security Issues

Operating System Security

Filesystem Security

Log Files and Security

Network Security

Securing the Initial MySQL Accounts

General Privilege Precautions

MySQL Cluster Network Security

FEDERATED Table Security

36. Upgrade-Related Security Issues.

Upgrading the Privilege Tables

Security-Related SQL Mode Values

37. Optimizing Queries.

Identifying Candidates for Query Analysis

Using EXPLAIN to Analyze Queries

How EXPLAIN Works

Analyzing a Query

EXPLAIN Output Columns

Using SHOW WARNINGS for Optimization

MyISAM Index Caching

38. Optimizing Databases.

General Table Optimizations

Normalization

MyISAM-Specific Optimizations

MyISAM Row-Storage Formats

Keep Optimizer Information Up to Date

FULLTEXT Indexes

Specifying MyISAM Maximum Row Count

InnoDB-Specific Optimizations

MERGE-Specific Optimizations

MEMORY-Specific Optimizations

39. Optimizing the Server.

Interpreting mysqld Server Information

Accessing Server System Variables

Accessing Server Status Variables

Measuring Server Load

Tuning Memory Parameters

Global (Server-Wide) Parameters

Per-Client Parameters

Using the Query Cache

Enabling the Query Cache

Measuring Query Cache Utilization

40. Interpreting Diagnostic Messages.

Sources of Diagnostic Information

Using the Error Log for Diagnostic Purposes

Using The Slow Query Log for Diagnostic Purposes

41. Optimizing the Environment.

Choosing Hardware for MySQL Use

Configuring Disks for MySQL Use

Moving Databases Using Symbolic Links

MyISAM Table Symlinking

Network Issues

Optimizing the Operating System for MySQL Use

42. Scaling MySQL.

Using Multiple Servers

Replication

Setting Up Replication

The Binary and Relay Logs

Replication-Related Threads

Replication Troubleshooting

Replication Compatibility and Upgrading

APPENDIXES.

A. References.

B. Other Offers.