MySQL in a Nutshell

Russell J. T. Dyer

  • 出版商: O'Reilly
  • 出版日期: 2005-05-13
  • 售價: $1,540
  • 貴賓價: 9.5$1,463
  • 語言: 英文
  • 頁數: 352
  • 裝訂: Paperback
  • ISBN: 0596007892
  • ISBN-13: 9780596007898
  • 相關分類: MySQLSQL
  • 已過版

買這商品的人也買了...

商品描述

Description:

MySQL is the world's most popular open source database. MySQL is designed for speed, power, and flexibility in mission-critical, heavy-use environments and modest applications as well. It's also surprisingly rich in features. If you're a database administrator or programmer you probably love the myriad of things MySQL can do, but sometimes wish there wasn't such a myriad of things to remember. With MySQL in a Nutshell by your keyboard, you can drill down into the full depth of MySQL's capabilities quickly and easily.

MySQL in a Nutshell is the indispensable desktop reference to all MySQL functions. Programming language APIs for PHP, Perl, and C are covered, as well as all the popular MySQL utilities.

This invaluable resource clearly documents the details that experienced users need to take full advantage of this powerful database management system. Better yet, this wealth of information is packed into the concise, comprehensive, and extraordinarily easy-to-use format for which the in a Nutshell guides are renowned.

In addition to providing a thorough reference to MySQL statements and functions, the administrative utilities, and the most popular APIs, MySQL in a Nutshell includes several tutorial chapters to help newcomers get started. Moreover, each chapter covering an API begins with a brief tutorial so that, regardless of your level of experience in any given area, you will be able to understand and master unfamiliar territory.

MySQL in a Nutshell distills all the vital MySQL details you need on a daily basis into one convenient, well-organized book. It will save you hundreds of hours of tedious research or trial and error and put the facts you need to truly tap MySQL's capabilities at your fingertips.

 

 

Table of Contents:

Chapter 1

Preface

1. Introduction to MySQL
     The Value of MySQL
     The MySQL Package
     Licensing
     Mailing Lists
     Books and Other Publications

2. Installing MySQL
     Choosing a Distribution
     Unix Source Distributions
     Unix Binary Distributions
     Linux RPM Distributions
     Macintosh OS X Distributions
     Novell NetWare Distributions
     Windows Distributions
     Postinstallation

3. MySQL Basics
     The mysql Client
     Creating a Database and Tables
     Show Me
     Inserting Data
     Selecting Data
     Ordering, Limiting, and Grouping
     Analyzing and Manipulating Data
     Changing Data
     Deleting Data
     Searching Data
     Importing Data in Bulk
     Command-Line Interface
     Conclusion

4. SQL Statements
     Statements Grouped by Type
     Statements and Clauses in Alphabetical Order
     ALTER DATABASE
     ALTER TABLE
     ALTER VIEW
     ANALYZE TABLE
     BACKUP TABLE
     CACHE INDEX
     CHANGE MASTER TO
     CHECK TABLE
     CHECKSUM TABLE
     COMMIT
     CREATE DATABASE
     CREATE INDEX
     CREATE TABLE
     CREATE VIEW
     DELETE
     DESCRIBE
     DO
     DROP DATABASE
     DROP INDEX
     DROP TABLE
     DROP USER
     DROP VIEW
     EXPLAIN
     FLUSH
     GRANT
     HANDLER
     INSERT
     JOIN
     KILL
     LOAD DATA FROM MASTER
     LOAD DATA INFILE
     LOAD INDEX INTO CACHE
     LOAD TABLE...FROM MASTER
     LOCK TABLES
     OPTIMIZE TABLE
     PURGE MASTER LOGS
     RENAME TABLE
     REPAIR TABLE
     REPLACE
     RESET
     RESET MASTER
     RESET SLAVE
     RESTORE TABLE
     REVOKE
     ROLLBACK
     ROLLBACK TO SAVEPOINT
     SAVEPOINT
     SELECT
     SET
     SET PASSWORD
     SET SQL_LOG_BIN
     SET TRANSACTION
     SHOW BINLOG EVENTS
     SHOW CHARACTER SET
     SHOW COLLATION
     SHOW COLUMNS
     SHOW CREATE DATABASE
     SHOW CREATE TABLE
     SHOW CREATE VIEW
     SHOW DATABASES
     SHOW ENGINES
     SHOW ERRORS
     SHOW GRANTS
     SHOW INDEX
     SHOW INNODB STATUS
     SHOW LOGS
     SHOW MASTER LOGS
     SHOW MASTER STATUS
     SHOW PRIVILEGES
     SHOW PROCESSLIST
     SHOW SLAVE HOSTS
     SHOW SLAVE STATUS
     SHOW STATUS
     SHOW TABLE STATUS
     SHOW TABLES
     SHOW VARIABLES
     SHOW WARNINGS
     START SLAVE
     START TRANSACTION
     STOP SLAVE
     TRUNCATE TABLE
     UNION
     UNLOCK TABLES
     USE

5. String Functions
     String Functions Grouped by Type
     String Functions in Alphabetical Order
     AES_DECRYPT( )
     AES_ENCRYPT( )
     ASCII( )
     BIN( )
     BINARY
     BIT_LENGTH( )
     CHAR( )
     CHAR_LENGTH( )
     CHARACTER_LENGTH( )
     COMPRESS( )
     CONCAT( )
     CONCAT_WS( )
     CONV( )
     DECODE( )
     DES_DECRYPT( )
     DES_ENCRYPT( )
     ELT( )
     ENCODE( )
     ENCRYPT( )
     EXPORT_SET( )
     FIELD( )
     FIND_IN_SET( )
     HEX( )
     INET_ATON( )
     INET_NTOA( )
     INSERT( )
     INSTR( )
     LCASE( )
     LEFT( )
     LENGTH( )
     LOAD_FILE( )
     LOCATE( )
     LOWER( )
     LPAD( )
     LTRIM( )
     MAKE_SET( )
     MATCH ( ) AGAINST( )
     MD5( )
     MID( )
     OCT( )
     OCTET_LENGTH( )
     OLD_PASSWORD( )
     ORD( )
     PASSWORD( )
     POSITION( )
     QUOTE( )
     REPEAT( )
     REPLACE( )
     REVERSE( )
     RIGHT( )
     RPAD( )
     RTRIM( )
     SHA( )
     SHA1( )
     SOUNDEX( )
     SPACE( )
     STRCMP( )
     SUBSTRING( )
     SUBSTRING_INDEX( )
     TRIM( )
     UCASE( )
     UNCOMPRESS( )
     UNCOMPRESSED_LENGTH( )
     UNHEX( )
     UPPER( )

6. Date and Time Functions
     Date and Time Functions Grouped by Type
     Determining the Date and Time
     Extracting and Formatting the Date and Time
     Calculating and Modifying the Date and Time
     Date and Time Functions in Alphabetical Order
     ADDDATE( )
     ADDTIME( )
     CONVERT_TZ( )
     CURDATE( )
     CURRENT_DATE( )
     CURRENT_TIME( )
     CURRENT_TIMESTAMP( )
     CURTIME( )
     DATE( )
     DATE_ADD( )
     DATE_FORMAT( )
     DATE_SUB( )
     DATEDIFF( )
     DAY( )
     DAYNAME( )
     DAYOFMONTH( )
     DAYOFWEEK( )
     DAYOFYEAR( )
     EXTRACT( )
     FROM_DAYS( )
     FROM_UNIXTIME( )
     GET_FORMAT( )
     HOUR( )
     LAST_DAY( )
     LOCALTIME( )
     LOCALTIMESTAMP( )
     MAKEDATE( )
     MAKETIME( )
     MICROSECOND( )
     MINUTE( )
     MONTH( )
     MONTHNAME( )
     NOW( )
     PERIOD_ADD( )
     PERIOD_DIFF( )
     QUARTER( )
     SEC_TO_TIME( )
     SECOND( )
     STR_TO_DATE( )
     SUBDATE( )
     SUBTIME( )
     SYSDATE( )
     TIME( )
     TIMEDIFF( )
     TIMESTAMP( )
     TIMESTAMPDIFF( )
     TIMESTAMPADD( )
     TIME_FORMAT( )
     TIME_TO_SEC( )
     TO_DAYS( )
     UNIX_TIMESTAMP( )
     UTC_DATE( )
     UTC_TIME( )
     UTC_TIMESTAMP( )
     WEEK( )
     WEEKDAY( )
     WEEKOFYEAR( )
     YEAR( )
     YEARWEEK( )

7. Mathematical and Aggregate Functions
     Functions in Alphabetical Order
     ABS( )
     ACOS( )
     ASIN( )
     ATAN( )
     ATAN2( )
     AVG( )
     BIT_AND( )
     BIT_OR( )
     BIT_XOR( )
     CEIL( )
     CEILING( )
     COS( )
     COT( )
     COUNT( )
     CRC32( )
     DEGREES( )
     EXP( )
     FLOOR( )
     FORMAT( )
     GREATEST( )
     GROUP_CONCAT( )
     LEAST( )
     LN( )
     LOG( )
     LOG2( )
     LOG10( )
     MAX( )
     MIN( )
     MOD( )
     PI( )
     POW( )
     POWER( )
     RADIANS( )
     RAND( )
     ROUND( )
     SIGN( )
     SIN( )
     SQRT( )
     STD( )
     STDDEV( )
     SUM( )
     TAN( )
     TRUNCATE( )
     VARIANCE( )

8. Flow Control Functions
     Functions in Alphabetical Order
     CASE( )
     IF( )
     IFNULL( )
     NULLIF( )

9. Miscellaneous Functions
     Functions in Alphabetical Order
     ANALYSE( )
     BENCHMARK( )
     BIT_COUNT( )
     CAST( )
     CHARSET( )
     COALESCE( )
     COERCIBILITY( )
     COLLATION( )
     CONNECTION_ID( )
     CONVERT( )
     CURRENT_USER( )
     DATABASE( )
     FOUND_ROWS( )
     GET_LOCK( )
     INTERVAL( )
     IS_FREE_LOCK( )
     IS_USED_LOCK( )
     ISNULL( )
     LAST_INSERT_ID( )
     MASTER_POS_WAIT( )
     RELEASE_LOCK( )
     SESSION_USER( )
     SYSTEM_USER( )
     USER( )
     UUID ( )
     VERSION( )

10. MySQL Server and Client
     mysql
     mysqld
     mysqld_multi
     mysqld_safe

11. Command-Line Utilities
     comp_err
     isamchk
     make_binary_distribution
     msql2mysql
     my_print_defaults
     myisamchk
     myisamlog
     myisampack
     mysqlaccess
     mysqladmin
     mysqlbinlog
     mysqlbug
     mysqlcheck
     mysqldump
     mysqldumpslow
     mysqlhotcopy
     mysqlimport
     mysqlshow
     perror

12. Perl API
     Using Perl DBI with MySQL
     Perl DBI Method and Function Reference
     available_drivers( )
     begin_work( )
     bind_col( )
     bind_columns( )
     bind_param( )
     bind_param_array( )
     bind_param_inout( )
     can( )
     clone( )
     column_info( )
     commit( )
     connect( )
     connect_cached( )
     data_sources( )
     disconnect( )
     do( )
     dump_results( )
     err( )
     errstr( )
     execute( )
     execute_array( )
     execute_for_fetch( )
     fetch( )
     fetchall_arrayref( )
     fetchall_hashref( )
     fetchrow_array( )
     fetchrow_arrayref( )
     fetchrow_hashref( )
     finish( )
     foreign_key_info( )
     func( )
     get_info( )
     installed_versions( )
     last_insert_id( )
     looks_like_number( )
     neat( )
     neat_list( )
     parse_dsn( )
     parse_trace_flag( )
     parse_trace_flags( )
     ping( )
     prepare( )
     prepare_cached( )
     primary_key( )
     primary_key_info( )
     quote( )
     quote_identifier( )
     rollback( )
     rows( )
     selectall_arrayref( )
     selectall_hashref( )
     selectcol_arrayref( )
     selectrow_array( )
     selectrow_arrayref( )
     selectrow_hashref( )
     set_err( )
     state( )
     table_info( )
     table_info_all( )
     tables( )
     trace( )
     trace_msg( )
     type_info( )
     type_info_all( )
     Attributes for Handles

13. PHP API
     Using PHP with MySQL
     PHP MySQL Functions in Alphabetical Order
     mysql_affected_rows( )
     mysql_change_user( )
     mysql_client_encoding( )
     mysql_close( )
     mysql_connect( )
     mysql_create_db( )
     mysql_data_seek( )
     mysql_db_name( )
     mysql_db_query( )
     mysql_drop_db( )
     mysql_errno( )
     mysql_error( )
     mysql_escape_string( )
     mysql_fetch_array( )
     mysql_fetch_assoc( )
     mysql_fetch_field( )
     mysql_fetch_lengths( )
     mysql_fetch_object( )
     mysql_fetch_row( )
     mysql_field_flags( )
     mysql_field_len( )
     mysql_field_name( )
     mysql_field_seek( )
     mysql_field_table( )
     mysql_field_type( )
     mysql_free_result( )
     mysql_get_client_info( )
     mysql_get_host_info( )
     mysql_get_proto_info( )
     mysql_get_server_info( )
     mysql_info( )
     mysql_insert_id( )
     mysql_list_dbs( )
     mysql_list_fields( )
     mysql_list_processes( )
     mysql_list_tables( )
     mysql_num_fields( )
     mysql_num_rows( )
     mysql_pconnect( )
     mysql_ping( )
     mysql_query( )
     mysql_real_escape_string( )
     mysql_result( )
     mysql_select_db( )
     mysql_stat( )
     mysql_tablename( )
     mysql_thread_id( )
     mysql_unbuffered_query( )

14. C API
     Using C with MySQL
     Functions in Alphabetical Order
     mysql_affected_rows( )
     mysql_autocommit( )
     mysql_change_user( )
     mysql_character_set_name( )
     mysql_close( )
     mysql_commit( )
     mysql_connect( )
     mysql_create_db( )
     mysql_data_seek( )
     mysql_debug( )
     mysql_drop_db( )
     mysql_dump_debug_info( )
     mysql_eof( )
     mysql_errno( )
     mysql_error( )
     mysql_escape_string( )
     mysql_fetch_field( )
     mysql_fetch_field_direct( )
     mysql_fetch_fields( )
     mysql_fetch_lengths( )
     mysql_fetch_row( )
     mysql_field_count( )
     mysql_field_seek( )
     mysql_field_tell( )
     mysql_free_result( )
     mysql_get_client_info( )
     mysql_get_client_version( )
     mysql_get_host_info( )
     mysql_get_proto_info( )
     mysql_get_server_info( )
     mysql_get_server_version( )
     mysql_info( )
     mysql_init( )
     mysql_insert_id( )
     mysql_kill( )
     mysql_list_dbs( )
     mysql_list_fields( )
     mysql_list_processes( )
     mysql_list_tables( )
     mysql_more_results( )
     mysql_next_result( )
     mysql_num_fields( )
     mysql_num_rows( )
     mysql_options( )
     mysql_ping( )
     mysql_query( )
     mysql_real_connect( )
     mysql_real_escape_string( )
     mysql_real_query( )
     mysql_reload( )
     mysql_rollback( )
     mysql_row_seek( )
     mysql_row_tell( )
     mysql_select_db( )
     mysql_set_server_option( )
     mysql_shutdown( )
     mysql_sqlstate( )
     mysql_stat( )
     mysql_store_result( )
     mysql_thread_id( )
     mysql_thread_safe( )
     mysql_use_result( )
     mysql_warning_count( )
     C API Datatypes

A. Datatypes

B. Operators

C. Environment Variables

Index