Tải bản đầy đủ (.pdf) (41 trang)

MySQL Administrator''''s Bible- P18

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (2.68 MB, 41 trang )

Resources
C
■ Wiki (
Page
) — Anyone can create and edit
pages to share knowledge. Current information on the wiki includes conference presenta-
tions, user-contributed documentation, articles, tutorials, and specifications.
Getting Documentation
The official documentation for MySQL is online at
/>. It includes
links to:
■ The comprehensive MySQL Reference Manual, for downloading or online viewing. The
reference manuals for MySQL 5.0 and 5.1 have been translated into several different for-
mats and languages. Visit
/>toseeamatrixofthe
documentation available.
■ MySQL GUI Tools documentation
■ Expert Guides for internals, the Cluster API, and the test framework
■ The sakila, world, employee, and menagerie example databases
■ Community contributed documentation
■ Documentation about the MySQL documentation
At the time of this writing, the official reference manual for MySQL 6.0 is only
available in English, and can be viewed online at />doc/refman/6.0/en/index.html or downloaded from the main documentation site at
/>Cheat sheets and quick references
■ MySQL 6.0 function and statement cheat sheets (
www.visibone.com/sql/
)—
From VisiBone, full-color quick-reference guides to all of the MySQL functions and state-
ments. Available for free download or purchase laminated pages or posters. Indicates
whether a function or statement is part of the ISO/ANSI SQL:2003 standard.


EXPLAIN
cheat sheet (
/>cheatsheet
) — Developed by author Sheeri K. Cabral with formatting help from Dave
Edwards, the
EXPLAIN
cheat sheet is a freely downloadable reference for quick or offline
lookup of what the different fields of output from
EXPLAIN
means
■ Common DBA tasks cheat sheet (
/>CheatSheet
) — From Wikibooks, a cheat sheet containing commands for sample
queries, metadata access, privilege administration, data types, resetting the root password,
and more.
■ Metadata access comparison (
/>i12meta.xml
) — Shows how to access metadata such as table names, column names,
and the software version in many vendors’ DBMS, including MySQL. A similar cheat
817
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C
Resources
sheet, formatted for printing, is available at
/>cheatsheet.pdf
.
Learning More
There are many resources for further education about MySQL. The most recent and up-to-date
learning opportunities can be found online or in person, in the form of articles and presenta-
tions.

Articles
■ Planet MySQL (
www.planetmysql.org
) — An aggregated feed of blog posts from the
MySQL Community. The top 30 most active contributors are highlighted, so if you prefer
you can follow the links and choose to follow a few individual blogs.
■ MySQL Magazine (
www.mysqlzine.net
) — Edited by Keith Murphy, MySQL Maga-
zine’s inaugural issue appeared in the summer of 2007. MySQL Magazine is produced four
times annually, with current and back issues freely available online as printable PDFs.
■ MySQL Developer Zone articles (
/>articles
) and news (
/>) — Collec-
tions of tech news and articles from and for MySQL developers
■ MySQL Newsletter (
www.mysql.com/news-and-events/newsletter
)—The
monthly newsletter ‘‘with articles about new products, new features, training, security
issues, known bugs, and events of interest to the MySQL community.’’ Current and back
issues are freely available online.
■ MySQL White Papers (
www.mysql.com/why-mysql/white-papers
)—White
papers about MySQL.
■ Sun’s list of MySQL Resources for System Administrators (
www.sun.com/
bigadmin/topics/mysql
) — Sun’s BigAdmin System Administration Portal contains a

section on MySQL resources for system administrators.
■ HowToForge articles (
www.howtoforge.com/howtos/mysql
) — How To articles for
MySQL tasks.
Presentations
There are many resources for seeing presentation slides and videos available:
■ MySQL presentations from before 2007 (
/>resources/presentations/
) — Presentations from conferences before 2007
■ Presentations from the 2007 MySQL User Conference and Expo (
www.
technocation.org/content/2007-mysql-user-conference-and-expo-
presentations-and-videos
) — A comprehensive list of presentations, slides, notes,
and videos from the 2007 MySQL User Conference and Expo
818
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Resources
C
■ Presentations from the 2008 MySQL User Conference and Expo (
http://
forge.mysql.com/wiki/MySQLConf2008Notes
) — A comprehensive list of
presentations, slides, notes, and videos from the 2008 MySQL User Conference and Expo
■ Presentations from the 2009 MySQL User Conference and Expo (
http://forge.
mysql.com/wiki/MySQLConf2009Notes
) — A comprehensive list of presentations,
slides, notes, and videos from the 2009 MySQL User Conference and Expo

The MySQL Forge Wiki ( will link to future con-
ferences, so make sure to look there.
■ MySQL live webinars (
www.mysql.com/news-and-events/web-seminars
)—
MySQL offers free live Webex webinars containing technology overviews
■ MySQL on-demand webinars (
www.mysql.com/news-and-events/on-demand-
webinars/
) — MySQL makes the most popular live webinars available for playback any
time
■ MySQL University (
University
)—In-
depth technical sessions given by leading MySQL developers and community members
■ MySQL presentations at Technocation (
/>areas/presentationsvideos
) — Technocation, Inc. is a not-for-profit organization
providing educational resources for IT professionals. They host many video presentations
and provide slides that can be freely downloaded or streamed for viewing online.
■ Popular video hosting sites — YouTube and Google Video are the most popular video
sharing sites in the United States. However, there are many more video-sharing sites, and
most have search capabilities. Simply searching for ‘‘mysql’’ on a video-sharing site can
turn up presentations and video tutorials about MySQL.
■ YouTube MySQL videos (
www.youtube.com/results?search query=mysql
)
— YouTube limits video uploads to 10 minutes, so the videos returned by this
search are usually short. The exception is videos on YouTube that come from Google
Video.

■ Google Video MySQL presentations (
/>search?q=mysql
) — Do a basic search for videos containing the keyword ‘‘mysql’’.
User group meetings
There are MySQL user groups throughout the world. Information about starting a user group as
well as what user groups currently exist can be found at
/>Category:MySQLUserGroups
.
Conferences
Conferences are an excellent place to see live presentations about MySQL and provide opportu-
nities to meet other MySQL DBAs while learning.
819
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C
Resources
■ MySQL Conference and Expo (
www.mysqlconf.com
) — Traditionally held in April
in Santa Clara, California, the MySQL Conference and Expo is the premier conference for
learning about MySQL and networking with other MySQL users.
■ OSCon (
/>) — OSCon, or the Open
Source Convention, is traditionally held during July in Portland, Oregon. There are usu-
ally several MySQL-related presentations.
■ Various camps —MySQLCampisafreeunconference for MySQL, held annually. As
MySQL Camp is organized by the MySQL Community and is not a commercial event,
the date and location changes often. MySQL Camp dates will be announced in many
places, including Planet MySQL blogs (

). OpenSQL Camp

(
www.opensqlcamp.org
) is a free unconference for open source databases, including
MySQL.
Training/certification
The training and certification opportunities that MySQL offers are listed at
www.mysql.com/
training
. MySQL maintains a list of third-party partners offering training at
http://
solutions.mysql.com/solutions/partners/training
.
820
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Symbols
-- (double dash), 88
# (pound), 89–90
% (modulus operator), 503–504
|| (string concatenation)
MySQL support, 107
SQL mode definitions, 210
\ (backslash)
escape characters, 91–93
naming limitations and quoting, 93–94
.(dot),95–97
” (double quotation mark)
naming limitations and, 93
SQL mode definitions, 204

! (exclamation point), 89
? (question mark), 49
; (semi-colons), 60
’ (single quotation mark), 93
\. (source),54–55
32-bit systems
vs. 64-bit systems, 12
choosing hardware, 349–350
\! command, 62
64-bit systems
vs. 32-bit systems, 12
choosing hardware, 349–350
OS architecture, 352
A
abstraction, view, 307–308
access. See also security
data access strategy, 596–606
database, 654
user account problems, 491
Access Control Lists (ACLs). See ACLs (Access Control
Lists)
accessing MySQL
Administrator, 74–80
command-line client tool, 52–62
with command-line tools, 49–52
mysqladmin,62–66
phpMyAdmin, 69 –71
Query Browser, 71–74
SQLyog, 66–69
summary, 83–84

Workbench, 80–83
accounts, user
debugging problems, 490–494
managing, 478–487
ACID (atomicity, consistency, isolation and durability)
compliance
defined, 319–320
PBXT, 410
understanding, 320–322
ACLs (Access Control Lists)
defined, 474–475
securing MySQL, 649–653
security with stored routines, 256
activity logging, 520–522
administration
Administrator tool, 74–80
log. See logs
measuring performance. See performance measurement
with mysqladmin,62–66
server tuning. See MySQL server tuning
storage engine. See storage engines
user management. See user management
agent-based systems, 635–636
agentless systems, 635–636
aggregate functions
NULL values and, 211
overview, 783 –784
alerts, monitoring. See monitoring systems
algorithms
MyISAM index buffer, 366

partitioning, 496–497
view, 309–310
aliases
creating trigger, 244
extension, 115
table, 592–594
ALLOW_INVALID_DATES, 204
823
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
A
Index
alpha releases, 11–12
ALTER EVENT, 295–296
ALTER ROUTINE, 270–271
ALTER TABLE
adding/dropping indexes, 223–225
adding/dropping partitions, 507–509
creating/dropping key constraints, 231–237
defined, 421
extensions, 115–118
ALTER VIEW, 316–317
ANALYZE TABLE
defined, 156
query analysis, 615
analyzing queries. See query analysis
anonymous users
creating, 35–36
removing, 39
ANSI, 204
ANSI QUOTES, 204

Apache, 360
API (Application Programming Interface)
memcached programming libraries, 436
security with stored routines, 256
Apple OS. See Mac OS
Application Programming Interface (API)
memcached programming libraries, 436
security with stored routines, 256
application-level partitioning, 514
architecture
Falcon, 402–403
high availability. See high availability architectures
operating system, 352–353
PBXT, 410–411
Archive
backing up, 462–463
understanding, 417–419
archive packages, 18–20
arguments
bitwise operators, 784–787
INOUT to stored procedure, 261–262
Lua basics, 758–759
mysqladmin,62–66
stored routines, events and triggers, 242
arithmetic MySQL Proxy tokens, 773
articles on MySQL, 818
assertions, 108
asynchronous replication
defined, 524–525
multi-master, 538–539

atomicity, 321
atomicity, consistency, isolation and durability (ACID)
compliance. See ACID (atomicity, consistency,
isolation and durability) compliance
attributes
binary data types, 171
changing events, 296
character string type, 164–166
datetime type, 191–192
ENUM and SET data types, 198–200
national character string types, 167
numeric type, 177–180, 181–182
auditing, trigger-based, 664–665
authentication
data security, 656–665
lack of client support, 491–492
managing user. See user management
privileges. See privileges
AUTO_INCREMENT
master/master replication, 537, 735
numeric type attributes, 177–178
table definition extensions, 147
autocommit mode, 157, 324–325
auto-completion
mysql commands, 58–59
SQLyog, 67
auto-generated data, 551
automated failover
defined, 729
with Linux-HA heartbeat, 742–744

with MySQL Proxy, 740–741
automated monitoring. See monitoring systems
automated startup, 42
automatic updates, 187–188
Axmark,David,4
B
backends
changing query, 763–764
MySQL Proxy, 751–755
backslash (\)
escape characters, 91–93
naming limitations and quoting, 93–94
backup
commercial options, 464–467
comparing storage engines, 377–378
copying databases, 467
event, 300
file system snapshot, 451–452
frequency, 443–444
LVM, 455–460
maatkit parallel dump/restore, 450–451
824
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Index
C
methods, 445–446
MySQL, 439–441
mysqldump, 446 –450
mysqlhotcopy, 462–463
online, 460–462

phpMyAdmin, 70
SAN and Microsoft VSS, 460
security, 656
SELECT INTO OUTFILE, 450
simple replication, 530–531
SQL Administrator, 79
stored routine, 286–287
summary, 472
trigger, 252–254
uses for, 441–443
what to and where to, 445
ZFS, 453–454
bad passwords, 490–491
batching
executing non-interactively, 54–55
expensive operations, 628–629
frequent operations, 629–631
battery-backed write cache, 351
BEGIN, 322
BEGIN WORK, 322
benchmarking
defined, 545–546
with mysqlslap, 547–552
overview, 546–547
recommendations, 565–566
with SysBench. See SysBench
Best Support For Multilingualism, 35
beta releases, 11–12
binary collations
character string type attributes and, 165

defined, 98
binary file vs. source code, 10
binary large object string types, 168–170
binary logs
backing up, 445
crash recovery, 468–471
defined, 518–519
master/master replication and, 736
rotating, 522–524
binary MySQL Proxy distributions, 750–751
binary packages, 20–24
binary plug-ins, 415
bin-log, 732
BIT
NULL and, 784
sizes and ranges, 173–174
bitwise operators, 784–787
black box queries, 255–256
Blackhole
complex replication, 536
replication support, 527
understanding, 419–420
blank values, 650
BLOB
data types, 168–170
indexing, 226–227
block devices, 738–739
blogging, 6
bogging down, 585
Boolean types, 180–183

Bouman, Roland, 716, 744
BTREE indexes
defined, 221–222
order, 225–226
redundant, 231
types, 228–229
buffer pools, 579
buffers
defined, 356–357
InnoDB configuration, 385
InnoDB status, 389
InnoDB storage engine options, 367–369
MyISAM, 365–366
profiling, 574
storage engine support, 377–378
bugs. See also debugging
BIT_AND NULL, 784
reports, 816
building queries, 67–69
C
CA (Certificate Authority)
command-line tool options, 53
encrypted connectivity, 662
cache hit ratio, 365–366
caching
implementing tables, 424–427
memcached, 434 –438
overview, 423 –424
PBXT configuration, 412
profiling, 576–577

query cache, 427–434
scaling with memcached, 747
summary, 438
Cacti, 637–638
CALL, 259–260
825
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C
Index
Callaghan, Mark, 525
canceling queries, 59–60
capacity planning, 585
cardinality, index, 615
CASCADE, 234
cascading replication, 535–536
CASE, 282–283
case-sensitivity
binary collations, 98
escape characters, 92
Falcon tablespace, 409
language structure, 90–91
query cache, 428
CAST
data types for, 811
defined, 102–105
MySQL support, 107
catalogs
managing with Administrator,
80
MySQL support, 107

object. See object catalog
catch-all partitions, 499
Certificate Authority (CA)
command-line tool options, 53
encrypted connectivity, 662
certificate files, 661–662
certification, MySQL, 820
CHANGE MASTER, 534
changelogs, 45–46
changing
events, 295–296
injecting queries and, 764–766
MERGE tables, 512–513
query backend, 763–764
stored routines, 270–271
triggers, 246–247
views, 316–317
CHAR, 160–162
character objects
character string types, 160
national character string types, 166
Character Set screen, 35
character sets
ALTER TABLE extensions, 116
changing event, 299
changing stored routine, 264
changing trigger, 249–250
character string type attributes and, 165–166
defined, 98–105
MySQL support, 108

SHOW commands, 136–137
table definition extensions, 147
CHARACTER_SETS, 695–696
characters
bit functions, 786
case-sensitivity, 90–91
escape, 91–93
index length, 226 –228
Lua basics, 757
national string types, 166–168
sets and collations, 98–105
string types, 160–166
wildcards, 475–476
cheat sheets, 817–818
check constraints
MySQL deviations, 111 –112
simulating in views, 310–312
CHECK TABLE, 150–153
checksums
correcting data drift, 540–542
table definition extensions, 147 –148
table maintenance extensions, 156
child tables, 234
chilling, 406
ciphers, 53
circular replication
defined, 537–539
scaling with, 736–737
cleanup
I/O test mode, 556–557

OLTP test mode, 563–565
SysBench commands, 553
clear command
defined, 59
mysqladmin,63
client tool
MySQL access, 52–62
setting characters sets and collation, 103
closing cursors, 287
Cluster, MySQL. See
MySQL Cluster
COALESCE
PARTITION, 508–509
code
language structure. See language structure
in MySQL community, 7
source, 4
source vs. binary file, 10
coercibility, 810 –811
cold backups
defined, 441
location, 445
tools, 446
826
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Index
C
COLLATION_CHARACTER_
SET_APPLICABILITY, 696–697
COLLATIONS, 696

collations
changing event, 299
changing stored routine, 264
changing trigger, 249–250
character string type attributes and, 165–166
language structure, 98–105
MySQL support, 108
SHOW commands, 137
table definition extensions, 148
COLUMN_PRIVILEGES, 712–713
COLUMNS, 676–679
columns
ALTER TABLE extensions, 118
privileges, 482
SHOW commands, 137
stored routine warning, 257–259
Comma Separated Value (CSV), 420–421
COMMAND in PROCESSLIST, 699–700
command-line tools
accessing MySQL with, 49–52
binary log, 519
client tool, 52–62
Maria, 401
memcached, 435
mysqladmin,62–66
proxy script behavior, 759
starting and stopping MySQL as service, 27
starting and stopping MySQL from Windows, 25–26
table maintenance, 154
using with Query Browser, 73

commands
events. See events
FLUSH TABLES WITH READ LOCK, 452
INFORMATION_SCHEMA database system view. See
MySQL Data Dictionary
LVM, 455–460
MySQL deviations. See deviations
mysqlhotcopy, 462–463
vs. options, 56
partitioning, 507–510
replication. See replication
rotating logs, 522–523
SHOW, 136–147
SHOW ENGINE InnoDB STATUS, 385–390
SHOW ENGINE PBXT STATUS, 414–415
storage engine, 421–422
SysBench, 553
table maintenance extensions, 150–156
transactional statement extensions, 156–158
triggers. See triggers
user management, 478 –487
comments
applying to events, 295
language structure, 88–90
Lua, 757
stored routine options, 266
table definition extensions, 148
commercial backup options, 464–467
commercial monitoring systems, 644–646
COMMIT

defined, 322
extensions, 156–158
community, 6–7
compactor threads, 411
company background, 4–5
comparison operators
defined, 789–791
MySQL support, 106–107
compilation
plugin, 722–723
SysBench, 565
Complete installation, 21–22
Complete package, 21
complex replication, 534–539
composite INTERVAL units, 801–802
composite keys, 220
composite partitioning
de
fined, 497
working with, 504–507
compound foreign key constraints, 232
compression
Archive, 417–418
command-line tool options, 53
commercial backup options, 466–467
functions, 788–789
ibbackup, 464
with myisampack, 381–382
concatenation, 107
concurrency

Concurrent Connections screen, 34
multi-version control, 335
MyISAM, 378–379
MyISAM inserts, 379–380
conditions, stored routine, 275–281
conferences, 819–820
configuration
Archive, 417–419
Configuration Wizard on Windows, 31–36
CSV, 420–421
827
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C
Index
configuration (continued)
encrypted connectivity, 663
Falcon, 403–409
FEDERATED storage engine, 415–417
initial MySQL, 29–31
InnoDB variables, 384–386
Maria, 396–401
memcached, 435
MEMORY, 395–396
MyISAM, 380
MySQL Proxy backends, 751–755
PBXT, 411–414
post-install on Unix, 36–39
query cache, 429–433
replication, 529–539
securing, 40–41

slave promotion, 732
Windows PATH variable, 42–44
configuration files. See option files
Confirmation screen
configuration options, 36
defined, 24
connection pooling, 746–747
connections
changing query backend, 763–764
command-line tool options, 51–52
debugging account problems, 492
encrypted, 659–664
health monitoring, 78
memcached, 437
MySQL deviations, 109
MySQL Proxy backends, 751–755
mysqladmin commands, 63–64
profiling, 577–578
Query Browser, 72–73
securing operating systems, 654–655
server maintenance extensions, 130
SQL Administrator, 76
SQLyog, 66–67
table definition extensions, 148
transaction. See transactions
consistency, 321
consistent backups, 440–441
consistent snapshot drivers, 461–462
constant propagation, 603–605
constants, MySQL Proxy, 766–771

constraints
key. See key constraints
MySQL deviations, 111 –112
security with stored routines, 256
simulating check in views, 310–312
control flow
functions, 791
stored routine, 282–284
conversion
datetime types, 188, 190–191
functions, 810 –812
CONVERT
data types for, 811
defined, 102
MySQL support, 107
copying databases, 467
corruption
hardware, 352
table maintenance, 150–154
count caching, 424–427
CPU test mode, 554
crash recovery. See recovery
CREATE,63
CREATE FUNCTION, 269
CREATE PROCEDURE, 268
CREATE TABLE
defined, 421
RANGE partitioning, 497–502
creating
basic stored functions, 268–269

events, 291–292
extensions, 118–119
Falcon tablespaces, tables and indexes, 409
indexes, 223–225
key constraints, 231–237
MERGE tables, 511–512
stored routines, 256–257
triggers, 243–244
users, 478–479
views, 302–303
cryptographic functions, 788–789
CSV (Comma Separated Value), 420–421
Ctrl functions, 58
cursors
mysql commands, 58
updatable, 109
using, 287–289
custom installation, 22
custom queries, 551–552
custom tables, 551–552
D
daemons
Linux-HA heartbeat, 742–744
memcached, 434 –438
MySQL Proxy. See MySQL Proxy
828
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Index
D
running multiple on same server, 360

security, 654–656
daily backups, 444
data
access strategies, 596–606
backing up. See backup
changes and foreign key constraints, 234
constraints. See key constraints
converting character sets, 104
drift, 540–543
exchange, 420
insertion with phpMyAdmin, 70
logs, 412–414
nodes, 744–746
querying. See queries
recovery. See recovery
security, 656–665
synchronization. See synchronization
table maintenance extensions, 150–156
transfer, 354
Data Definition Language (DDL) statements, 322
Data Dictionary, MySQL. See MySQL Data Dictionary
Data Manipulation Language (DML). See DML (Data
Manipulation Language)
Data Manipulation Statements (DMS), 575
data types
binary large object string, 168–170
Boolean, 180–183
character string, 160–166
choosing SQL modes, 201–211
conversions, 810–812

date and time functions, 797 –806
datetime, 183–193
ENUM and SET, 195–200
FULLTEXT index support, 238
indexing, 226–227
interval, 193–194
mathematical functions and numbers, 795–797
MySQL deviations, 106
MySQL Proxy tokens, 773
national character string, 166–168
NULL values, 211–212
numeric, 170–180
optimal for existing data, 212–216
overview, 159
string functions on TEXT types, 806–810
summary, 217
XML functions, 812
Database Explorer, 72
Database Usage screen, 33
databases
access, 654
changing with use,57
client tool options, 52–53
copying to backup, 467
links, 416
management tools. See GUI (Graphical User Interface)
tools
monitoring. See monitoring systems
partitioning. See partitioning
privileges, 481–482

setting characters sets and collation, 101
SHOW CREATE commands, 137–139
dates
DATE data types, 183–192
SQL mode definitions, 204, 207–209
datetime types
defined, 183–193
functions, 797–806
DAY_TIME data types, 193–194
DDL (Data Definition Language) statements, 322
deadlocks
Falcon parameters, 406
InnoDB status, 389
page-level and row-level, 341
transaction, 336–343
Debian
rotating logs, 524
tuning, 353
debugging
Falcon parameters, 403–404
mysqladmin commands, 63
with SHOW ENGINE InnoDB STATUS, 389–390
stored routine conditions and handlers, 275–281
with system command, 62
user account problems, 490–494
DECIMAL, 172
Decision Support, 34
DECLARE
stored routine conditions, 281
using

cursors, 287–288
Dedicated MySQL server machine,
32
default backup drivers, 461–462
default behavior, 203
DEFAULT values
character string type attributes, 165
datetime type attributes, 191 –192
ENUM and SET attributes, 198
numeric type attributes, 177
defense in depth, 649
829
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
D
Index
definers
changing trigger, 250–252
specifying view, 306–307
defining views
abstraction and simplification, 307–308
changing definitions, 316–317
definer specification, 306–307
limitations and unexpected behavior, 304–305
overview, 302–303
performance, 308–313
security and privacy, 305–306
updatable, 313–316
defragmentation
InnoDB tablespace, 390
partition table, 509

query cache, 433–434
table maintenance extensions, 154–155
DELAY_KEY_WRITE, 148
delaying inserts, 121–122
DELETE
batching, 628–629
DML extensions, 120–121
EXPLAIN on, 614
foreign key constraints and, 234
invoking triggers, 242–243
mysql commands, 58
rows from MEMORY tables, 395
slave servers and recovery, 443
updatable views, 313–316
updating indexes, 223
delimiters
mysql commands, 60
stored procedure, 257
trigger, 245
DES keys, 130
DESC keyword, 226
DESCRIBE, 109
descriptor areas, 109
design with MySQL Workbench, 80–83
destination hosts, 467
Detailed Configuration, 31 –32
determinism
caching SELECT statements, 427–428
stored routine options, 266–267
Developer machine, 32

deviations
check constraints, 111–112
privileges and permissions, 110
transaction management, 110–111
understanding, 105–110
upsert statements, 112–114
diagnostics management, 110
diagrams, Workbench, 82–83
Dictionary, MySQL Data. See MySQL Data Dictionary
directives
configuration file, 29
in server option file, 362
directories
copying databases to backup, 467
creating LVM, 458–459
ibbackup, 464–465
MySQL server archive package, 19
partitioning, 354
SQL mode definitions, 206
table definition extensions, 148
trigger storage, 252–254
dirty reads
defined, 326
READ UNCOMMITTED, 329–330
disabled event schedulers, 290
disabled events, 294–295
disaster planning, 471–472
disaster recovery. See recovery
disk space, 155
displaying permissions. See permissions display

DISTINCTROW, 128
distributed caching, 434
distributed replicated block devices (DRBDs), 738–739
DML (Data Manipulation Language)
EXPLAIN on non-SELECT statements, 614
extensions, 119–124
using to update views, 313–314
DMS (Data Manipulation Statements), 575
documentation
MySQL, 817–818
in MySQL community, 6
domain support, 108
dot notation, 95–97
DOUBLE, 174–176
double dash (--), 88
double quotation mark (”)
naming limitations and, 93
SQL mode definitions, 204
double-buffering, 357
downloading MySQL, 12
DRAM-based drives, 351–352
DRBDs (distributed replicated block devices),
738–739
drivers, backup, 461–462
DROP,63
DROP TABLE
, 422
830
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Index

E
dropping
events, 291–292
extensions, 124–125
indexes, 223–225
key constraints, 231–237
MERGE tables, 513
partitions, 507 –509
stored routines, 261
triggers, 244–245
users, 478–479
views, 303
dual licensing model, 4
dual-master replication, 735–736
dumps
defined, 446–450
maatkit parallel restore and, 450–451
mysqldumpslow, 583–584
duplicate key errors, 117–118
durability, 321–322
dynamic shared objects, 722–723
dynamic variables
assigning values to, 134–135
server tuning, 371–372
slow query log management, 521
E
editing with Query Browser, 71
ego command, 61
embedded declarations, 108–109
enabled events, 294–295

encryption
backup, 466–467
connectivity, 659–664
data flow security, 658
functions, 788 –789
end of life versions, 569
end times, 293–294
endian formats, 379
ENGINES, 697
engines
SHOW commands, 139–140
SQL mode definitions, 206
storage. See storage engines
table definition extensions, 148
Enterprise, MySQL, 5–6
Enterprise Monitoring, MySQL, 644–645
Entity Relationship (ER) diagram, 82–83
ENUM, 195–200
error logs
defined, 517–518
event, 297–298
installation problems, 26
troubleshooting MySQL servers, 47–48
ERROR_FOR_DIVISION_BY_ZERO, 204–205
errors
creating events, 292
determinism and stored routines, 267
foreign key constraint requirements, 235–237
InnoDB status, 389
myisam_ftdump, 383

MySQL deviations, 105
partition table restrictions, 510
SHOW commands, 137, 140
source command, 55
SQL modes, 201–203
stored routine, 274–275
stored routine conditions and handlers, 275–281
stored routine warning, 257–259
escape characters, 91–93
escape sequences, 91–93
Essentials package, 21
EVENTS, 691–693
events
after last execution, 296–297
backup and storage, 300
caching with Event Scheduler, 424–426
changing, 295–296
creating and dropping, 291–292
Event Scheduler, 708
finding all, 295
limitations, 299
logging, 297–298. See also logs
runtime behavior, 298–299
SHOW commands, 140–141
SHOW CREATE commands, 138
start and end times for periodic, 293–294
status, 294–295
stored routines, triggers and, 241–242
turning on scheduler, 289–290
exclamation point (!), 89

execution
after event, 296–297
MySQL deviations, 110
plans, 595
SysBench, 552
exiting mysql,56
expensive operation batching, 628–629
expire_logs_days, 523
EXPLAIN
data access strategy, 596–606
EXTENDED, 612 –613
831
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
E
Index
EXPLAIN (continued)
extra, 608–611
on non-SELECT statements, 614
overview, 590–595
plan indexes, 606–607
rows, 607–608
subqueries and, 611–612
EXPLAIN PARTITIONS, 501–502
exports
logical backups, 439–440
with mysqldump, 449–450
with SELECT... INTO OUTFILE, 126–127
ext2, 355–356
ext3, 355
EXTENDED EXPLAIN, 612–613

extended INSERT, 448
extended status,63
eXtensible Markup Language (XML)
functions, 812
LOAD XML INFILE, 123–124
extensions
additional, 127 –129
aliases, 115
ALTER TABLE, 115–118
CREATE, 118–119
DML, 119–124
DROP, 124–125
LIMIT, 125–126
PLUGINS system view, 697–698
SELECT, 126
SELECT...INTO OUTFILE, 126–127
server maintenance, 129–131
SET and user-defined variables, 131–135
SHOW, 135–147
SHOW GLOBAL STATUS, 566–568
summary, 158
table definition, 147–150
table maintenance, 150–156
transactional statement, 156–158
using, 114–115
Extra
EXPLAIN, 608–611
optimizing away Using temporary, 620–623
Using filesort, 618–620
F

failover
defined, 729
master/master replication and, 736
with MySQL Proxy, 740–741
Falcon
replication support, 527
storage engine options, 370–371
understanding, 401–409
FALSE,94–95
FEDERATED storage engine, 415–417
FETCH, 288–289
fields
ALTER TABLE extensions, 116
ENUM and SET, 197
EXPLAIN. See EXPLAIN
INFORMATION_SCHEMA database system view. See
MySQL Data Dictionary
key constraints, 220–221
master-master replication and auto increment, 537
optimal data type for existing data, 211–216
redundant indexes, 230–231
setting characters sets and collation, 101–102
SHOW SLAVE STATUS, 532–533
SQL mode definitions, 206
triggers aliases, 244
file systems
commercial backup options, 464–467
LVM, 455–460
SAN and Microsoft VSS, 460
setting characters sets and collation, 103

snapshots, 451–452
testing with SysBench, 555–557
ZFS, 453–454
files
comparing storage engines, 377–378
configuration, 29–31
copying databases to backup, 467
CSV, 420–421
ibdata, 390–392
InnoDB status, 389
limit of open, 357–358
option. See option files
PBXT growth variables, 414
shared tablespace, 392–393
systems and partitions, 353–356
tests, 556
trigger storage, 252–254
finding
events, 295
triggers, 252
fixed-width strings
binary data types, 171
character string types, 160
national character string types, 166
832
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

×