English Español Português Italiano
Tutorials Guide Help
Sitemap Adobe Autodesk Microsoft Corel Sony GNU Others

MySQL Server Tutorial


 









MySQL Server Tutorial

MySQL Server Tutorial FREE DOWNLOAD THIS TUTORIAL
Tutorial in pdf format so you can save it to your PC, e-book reader or print.


Sponsored link



Note: The tutorial you are about to download is compressed format. Rar, if you do not have a decompressor rar files you can download 7-zip and you can display the Foxit PDF Reader.



Index MySQL Server Tutorial


Table of Contents
1 General Information About MySQL
What Is MySQL
What Is MySQL AB
About This Manual
Conventions Used in This Manual
History of MySQL
Books About MySQL
The Main Features of MySQL
How Stable Is MySQL?
Year 2000 Compliance
General SQL Information and Tutorials
Useful MySQL-related Links
2 MySQL Mailing Lists
The MySQL Mailing Lists
Asking Questions or Reporting Bugs
How to Report Bugs or Problems
Guidelines for Answering Question on the Mailing List
3 MySQL Licensing and Support
MySQL Licensing Policy
Copyrights Used by MySQL
Copyright Changes
Example Licensing Situations
Selling Products that use MySQL
ISP MySQL Services
Running a Web Server Using MySQL
MySQL Licensing and Support Costs
Payment information
Contact Information
Types of Commercial Support
Basic E-mail Support
Extended E-mail Support
Login Support
Extended Login Support
Telephone Support
Support for other table handlers
4 Installing MySQL
How to Get MySQL
Operating Systems Supported by MySQL
Which MySQL Version to Use
How and When Updates Are Released
Installation Layouts
Installing a MySQL Binary Distribution
Linux RPM Notes
Building Client Programs
System-specific Issues
Linux Notes for Binary Distributions
HP-UX Notes for Binary Distributions
Installing a MySQL Source Distribution
Quick Installation Overview
Applying Patches
Typical configure Options
Installing from the Development Source Tree
Problems Compiling?
MIT-pthreads Notes
Perl Installation Comments
Installing Perl on Unix
Installing ActiveState Perl on Windows
Installing the MySQL Perl Distribution on Windows
Problems Using the Perl DBI/DBD Interface
System-specific Issues
Solaris Notes
Solaris 2/2
Solaris x86 Notes
SunOS 4 Notes
Linux Notes (All Linux Versions)
Linux-x86 Notes
RedHat Version 5.0 Notes
RedHat Version 5
Linux-SPARC Notes
Linux-Alpha Notes
MkLinux Notes
Qube2 Linux Notes
Linux IA64 Notes
Alpha-DEC-UNIX Notes (Tru64)
Alpha-DEC-OSF1 Notes
SGI-Irix Notes
FreeBSD Notes
NetBSD notes
OpenBSD Notes
OpenBSD 2
OpenBSD 2
BSD/OS Notes
BSD/OS Version 2.x Notes
BSD/OS Version 3.x Notes
BSD/OS Version 4.x Notes
SCO Notes
SCO Unixware Version 7.0 Notes
IBM-AIX notes
HP-UX Version 10 Notes
HP-UX Version 11.x Notes
Mac OS X Notes
Mac OS X Public beta
Mac OS X Server
BeOS Notes
Windows Notes
Installing MySQL on Windows
Starting MySQL on Windows 95 or Windows 98
Starting MySQL on Windows NT or Windows 2000
Running MySQL on Windows
Connecting to a Remote MySQL from Windows with SSH
Splitting Data Across Difierent Disks on Windows
Compiling MySQL Clients on Windows
MySQL-Windows Compared to Unix MySQL
OS/2 Notes
MySQL Binaries
Post-installation Setup and Testing
Problems Running mysql_install_db
Problems Starting the MySQL Server
Starting and Stopping MySQL Automatically
mysqld Command-line Options
Option Files
Installing Many Servers on the Same Machine
Upgrading/Downgrading MySQL
Upgrading From Version 3.22 to Version 3.23
Upgrading from Version 3.21 to Version 3.22
Upgrading from Version 3.20 to Version 3.21
Upgrading to Another Architecture
5 How Standards-compatible Is MySQL?
MySQL Extensions to ANSI SQL92
Running MySQL in ANSI Mode
MySQL Difierences Compared to ANSI SQL92
Functionality Missing from MySQL
Sub-selects
SELECT INTO TABLE
Transactions
Stored Procedures and Triggers
Foreign Keys
Reasons NOT to Use Foreign Keys constraints
Views
`--' as the Start of a Comment
What Standards Does MySQL Follow?
How to Cope Without COMMIT/ROLLBACK
6 The MySQL Access Privilege System
General Security
How to Make MySQL Secure Against Crackers
Startup Options for mysqld Concerning Security
What the Privilege System Does
MySQL User Names and Passwords
Connecting to the MySQL Server
Keeping Your Password Secure
Privileges Provided by MySQL
How the Privilege System Works
Access Control, Stage 1: Connection Verification
Access Control, Stage 2: Request Verification
When Privilege Changes Take Efiect
Setting Up the Initial MySQL Privileges
Adding New Users to MySQL
Setting Up Passwords
Causes of Access denied Errors
7 MySQL Language Reference
Literals: How to Write Strings and Numbers
Strings
Numbers
Hexadecimal Values
NULL Values
Database, Table, Index, Column, and Alias Names
Case Sensitivity in Names
User Variables
Column Types
Column Type Storage Requirements
Numeric Types
Date and Time Types
Y2K Issues and Date Types
The DATETIME, DATE, and TIMESTAMP Types
The TIME Type
The YEAR Type
String Types
The CHAR and VARCHAR Types
The BLOB and TEXT Types
The ENUM Type
The SET Type
Choosing the Right Type for a Column
Column Indexes
Multiple-column Indexes
Using Column Types from Other Database Engines
Functions for Use in SELECT and WHERE Clauses
Grouping Functions
Normal Arithmetic Operations
Bit Functions
Logical Operations
Comparison Operators
String Comparison Functions
Cast Operators
Control Flow Functions
Mathematical Functions
String Functions
Date and Time Functions
Miscellaneous Functions
Functions for Use with GROUP BY Clauses
CREATE DATABASE Syntax
DROP DATABASE Syntax
CREATE TABLE Syntax
Silent Column Specification Changes
ALTER TABLE Syntax
RENAME TABLE Syntax
DROP TABLE Syntax
OPTIMIZE TABLE Syntax
CHECK TABLE Syntax
BACKUP TABLE Syntax
RESTORE TABLE Syntax
ANALYZE TABLE Syntax
REPAIR TABLE Syntax
DELETE Syntax
TRUNCATE Syntax
SELECT Syntax
JOIN Syntax
INSERT Syntax
INSERT ... SELECT Syntax
INSERT DELAYED syntax
REPLACE Syntax
LOAD DATA INFILE Syntax
UPDATE Syntax
USE Syntax
FLUSH Syntax
KILL Syntax
SHOW Syntax
SHOW Information About Databases, Tables, Columns, and Indexes
SHOW TABLE STATUS
SHOW STATUS
SHOW VARIABLES
SHOW LOGS
SHOW PROCESSLIST
SHOW GRANTS
SHOW CREATE TABLE
EXPLAIN Syntax (Get Information About a SELECT)
DESCRIBE Syntax (Get Information About Columns)
BEGIN/COMMIT/ROLLBACK Syntax
LOCK TABLES/UNLOCK TABLES Syntax
SET Syntax
SET TRANSACTION Syntax
GRANT and REVOKE Syntax
CREATE INDEX Syntax
DROP INDEX Syntax
Comment Syntax
CREATE FUNCTION/DROP FUNCTION Syntax
Is MySQL Picky About Reserved Words?
8 MySQL Table Types
MyISAM Tables
Space Needed for Keys
MyISAM Table Formats
Static (Fixed-length) Table Characteristics
Dynamic Table Characteristics
Compressed Table Characteristics
MyISAM table problems.
Corrupted MyISAM tables
Clients is using or hasn't closed the table properly
MERGE Tables
ISAM Tables
HEAP Tables
BDB or Berkeley DB Tables
Overview of BDB Tables
Installing BDB
BDB startup options
Some characteristic of BDB tables:
Some things we need to fix for BDB in the near future:
Operating systems supported by BDB
Errors You May Get When Using BDB Tables
GEMINI Tables
GEMINI Overview
GEMINI Features
GEMINI Concepts
GEMINI Limitations
Using GEMINI Tables
Startup Options
Creating GEMINI Tables
Backing Up GEMINI Tables
Restoring GEMINI Tables
Using Auto Increment Columns With GEMINI Tables
Performance Considerations
Sample Configurations
When To Use GEMINI Tables
InnoDB Tables
InnoDB tables overview
InnoDB startup options
Creating InnoDB table space
If something goes wrong in database creation
Creating InnoDB tables
Converting MyISAM tables to InnoDB
Adding and removing InnoDB data and log files
Backing up and recovering an InnoDB database
Checkpoints
Moving an InnoDB database to another machine
InnoDB transaction model
Consistent read
Locking reads
Next-key locking: avoiding the phantom problem
Locks set by difierent SQL statements in InnoDB
Deadlock detection and rollback
Performance tuning tips
Implementation of multiversioning
Table and index structures
Physical structure of an index
Insert bufiering
Adaptive hash indexes
Physical record structure
How an auto-increment column works in InnoDB
File space management and disk i/o
Disk i/o
File space management
Defragmenting a table
Error handling
Some restrictions on InnoDB tables
InnoDB contact information
9 MySQL Tutorial
Connecting to and Disconnecting from the Server
Entering Queries
Creating and Using a Database
Creating and Selecting a Database
Creating a Table
Loading Data into a Table
Retrieving Information from a Table
Selecting All Data
Selecting Particular Rows
Selecting Particular Columns
Sorting Rows
Date Calculations
Working with NULL Values
Pattern Matching
Counting Rows
Using More Than one Table
Getting Information About Databases and Tables
Examples of Common Queries
The Maximum Value for a Column
The Row Holding the Maximum of a Certain Column
Maximum of Column per Group
The Rows Holding the Group-wise Maximum of a Certain Field
Using user variables
Using Foreign Keys
Searching on Two Keys
Using mysql in Batch Mode
Queries from Twin Project
Find all Non-distributed Twins
Show a Table on Twin Pair Status
10 MySQL Server Functions
What Languages Are Supported by MySQL?
The Character Set Used for Data and Sorting
Adding a New Character Set
The character definition arrays
String Collating Support
Multi-byte Character Support
How Big MySQL Tables Can Be
11 Replication in MySQL
Introduction
Replication Implementation Overview
HOWTO
Replication Features and known problems
Replication Options in my.cnf
SQL Commands Related to Replication
Replication FAQ
Troubleshooting Replication
12 MySQL Full-text Search
Fine-tuning MySQL Full-text Search
New Features of Full-text Search to Appear in MySQL 4.0
Full-text Search TODO
13 Getting Maximum Performance from MySQL
Optimization Overview
System/Compile Time and Startup Parameter Tuning
How Compiling and Linking Afiects the Speed of MySQL
Disk Issues
Using Symbolic Links
Using Symbolic Links for Databases
Using Symbolic Links for Tables
Tuning Server Parameters
How MySQL Opens and Closes Tables
Drawbacks to Creating Large Numbers of Tables in the Same Database
Why So Many Open tables?
How MySQL Uses Memory
How MySQL Locks Tables
Table Locking Issues
How MySQL uses DNS
Get Your Data as Small as Possible
How MySQL Uses Indexes
Speed of Queries that Access or Update Data
Estimating Query Performance
Speed of SELECT Queries
How MySQL Optimizes WHERE Clauses
How MySQL Optimizes DISTINCT
How MySQL Optimizes LEFT JOIN and RIGHT JOIN
How MySQL Optimizes LIMIT
Speed of INSERT Queries
Speed of UPDATE Queries
Speed of DELETE Queries
Other Optimization Tips
Using Your Own Benchmarks
Design Choices
MySQL Design Limitations/Tradeofis
Portability
What Have We Used MySQL For?
14 The MySQL Benchmark Suite
15 MySQL Utilites
Overview of the Difierent MySQL Programs
mysqld-max, An extended mysqld server
safe mysqld, the wrapper around mysqld
mysqld multi, program for managing multiple MySQL servers
The Command-line Tool
Administering a MySQL Server
Dumping the Structure and Data from MySQL Databases and Tables
Copying MySQL Databases and Tables
Importing Data from Text Files
Converting an error code to the corresponding error message
Showing Databases, Tables, and Columns
The MySQL Compressed Read-only Table Generator
16 Maintaining a MySQL Installation
Using myisamchk for Table Maintenance and Crash Recovery
myisamchk Invocation Syntax
General Options for myisamchk
Check Options for myisamchk
Repair Options for myisamchk
Other Options for myisamchk
myisamchk Memory Usage
Using mysqlcheck for Table Maintenance and Crash Recovery
Setting Up a Table Maintenance Regimen
Getting Information About a Table
Using myisamchk for Crash Recovery
How to Check Tables for Errors
How to Repair Tables
Table Optimization
Log file Maintenance
17 Adding New Functions to MySQL
Adding a New User-definable Function
UDF Calling Sequences
Argument Processing
Return Values and Error Handling
Compiling and Installing User-definable Functions
Adding a New Native Function
18 Adding New Procedures to MySQL
Procedure Analyse
Writing a Procedure
19 MySQL ODBC Support
How To Install MyODBC
How to Fill in the Various Fields in the ODBC Administrator Program
Connect parameters for MyODBC
How to Report Problems with MyODBC
Programs Known to Work with MyODBC
How to Get the Value of an AUTO_INCREMENT Column in ODBC
Reporting Problems with MyODBC
20 Using MySQL with Some Common Programs
Using MySQL with Apache
Borland C++
21 Problems and Common Errors
How to Determine What Is Causing Problems
What to Do if MySQL Keeps Crashing
Problems When Linking with the MySQL Client Library
Some Common Errors When Using MySQL
Access denied Error
MySQL server has gone away Error
Can't connect to [local] MySQL server error
Host '...' is blocked Error
Too many connections Error
Some non-transactional changed tables couldn't be rolled back Error
Out of memory Error
Packet too large Error
Communication Errors / Aborted Connection
The table is full Error
Can't create/write to file Error
Commands out of sync Error in Client
Ignoring user Error
Table 'xxx' doesn't exist Error
Cant initialize character set xxx error
How MySQL Handles a Full Disk
How to Run SQL Commands from a Text File
Where MySQL Stores Temporary Files
How to Protect `/tmp/mysql.sock' from Being Deleted
How to Run MySQL As a Normal User
How to Reset a Forgotten Password
Problems with File Permissions
File Not Found
Problems Using DATE Columns
Time Zone Problems
Case Sensitivity in Searches
Problems with NULL Values
Problems with alias
Deleting Rows from Related Tables
Solving Problems with No Matching Rows
Problems with ALTER TABLE
How To Change the Order of Columns in a Table
TEMPORARY TABLE problems
22 Solving Some Common Problems with MySQL
Database Replication with Update Log
Database Backups
Running Multiple MySQL Servers on the Same Machine
23 The MySQL log files
The Error Log
The Query Log
The Update Log
The Binary Log
The Slow Query Log
24 MySQL APIs
MySQL C API
C API Datatypes
C API Function Overview
C API Function Descriptions
mysql_affected_rows()
mysql_close()
mysql_connect()
mysql_change_user()
mysql_character_set_name()
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_fields()
mysql_fetch_field_direct()
mysql_fetch_lengths()
mysql_fetch_row()
mysql_field_count()
mysql_field_seek()
mysql_field_tell()
mysql_free_result()
mysql_get_client_info()
mysql_get_host_info()
mysql_get_proto_info()
mysql_get_server_info()
mysql_info()
mysql_init()
mysql_insert_id()
mysql_kill()
mysql_list_dbs()
mysql_list_fields()
mysql_list_processes()
mysql_list_tables()
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_row_seek()
mysql_row_tell()
mysql_select_db()
mysql_shutdown()
mysql_stat()
mysql_store_result()
mysql_thread_id()
mysql_use_result()
Common questions and problems when using the C API
Why Is It that After mysql_query() Returns Success, mysql_store_result() Sometimes Returns NULL?
What Results Can I Get From a Query?
How Can I Get the Unique ID for the Last Inserted Row?
Problems Linking with the C API
How to Make a Thread-safe Client
MySQL Perl API
DBI with DBD::mysql
The DBI Interface
More DBI/DBD Information
MySQL Eifiel wrapper
MySQL Java Connectivity (JDBC)
MySQL PHP API
Common Problems with MySQL and PHP
MySQL C++ APIs
MySQL Python APIs
MySQL Tcl APIs
25 How MySQL Compares to Other Databases
How MySQL Compares to mSQL
How to Convert mSQL Tools for MySQL
How mSQL and MySQL Client/Server Communications Protocols Difier
How mSQL 2.0 SQL Syntax Difiers from MySQL
How MySQL Compares to PostgreSQL
MySQL and PostgreSQL development strategies
Featurevise Comparison of MySQL and PostgreSQL
Benchmarking MySQL and PostgreSQL
26 MySQL Internals
MySQL Threads
MySQL Test Suite
Running the MySQL Test Suite
Extending the MySQL Test Suite
Reporting bugs in the MySQL Test Suite
Appendix A Environment Variables
Appendix B Some MySQL Users
General News Sites
Some Web Search Engines
Some Information Search Engines Concentrated on Some Area
Online Magazines
Web Sites that Use MySQL as a Backend
Some Domain/Internet/Web and Related Services
Web Sites that Use PHP and MySQL
Some MySQL Consultants
Programming
Uncategorized Pages
Appendix C MySQL customer usage
Appendix D Contributed Programs
APIs
Clients
Web Tools
Performance Benchmarking Tools
Authentication Tools
Converters
Using MySQL with Other Products
Useful Tools
RPMs for Common Tools (Most Are for RedHat 6.1)
Useful Functions
Windows programs
Uncategorized
Appendix E Credits
Developers at MySQL AB
Contributors to MySQL
Supporters to MySQL
Appendix F MySQL change history
Changes in release 4.0.x (Development; Alpha)
Changes in release 4.0.0
Changes in release 3.23.x (Stable)
Changes in release 3.23.39
Changes in release 3.23.38
Changes in release 3.23.37
Changes in release 3.23.36
Changes in release 3.23.35
Changes in release 3.23.34a
Changes in release 3.23.34
Changes in release 3.23.33
Changes in release 3.23.32
Changes in release 3.23.31
Changes in release 3.23.30
Changes in release 3.23.29
Changes in release 3.23.28
Changes in release 3.23.27
Changes in release 3.23.26
Changes in release 3.23.25
Changes in release 3.23.24
Changes in release 3.23.23
Changes in release 3.23.22
Changes in release 3.23.21
Changes in release 3.23.20
Changes in release 3.23.19
Changes in release 3.23.18
Changes in release 3.23.17
Changes in release 3.23.16
Changes in release 3.23.15
Changes in release 3.23.14
Changes in release 3.23.13
Changes in release 3.23.12
Changes in release 3.23.11
Changes in release 3.23.10
Changes in release 3.23.9
Changes in release 3.23.8
Changes in release 3.23.7
Changes in release 3.23.6
Changes in release 3.23.5
Changes in release 3.23.4
Changes in release 3.23.3
Changes in release 3.23.2
Changes in release 3.23.1
Changes in release 3.23.0
Changes in release 3.22.x (Older; Still supported)
Changes in release 3.22.35
Changes in release 3.22.34
Changes in release 3.22.33
Changes in release 3.22.32
Changes in release 3.22.31
Changes in release 3.22.30
Changes in release 3.22.29
Changes in release 3.22.28
Changes in release 3.22.27
Changes in release 3.22.26
Changes in release 3.22.25
Changes in release 3.22.24
Changes in release 3.22.23
Changes in release 3.22.22
Changes in release 3.22.21
Changes in release 3.22.20
Changes in release 3.22.19
Changes in release 3.22.18
Changes in release 3.22.17
Changes in release 3.22.16
Changes in release 3.22.15
Changes in release 3.22.14
Changes in release 3.22.13
Changes in release 3.22.12
Changes in release 3.22.11
Changes in release 3.22.10
Changes in release 3.22.9
Changes in release 3.22.8
Changes in release 3.22.7
Changes in release 3.22.6
Changes in release 3.22.5
Changes in release 3.22.4
Changes in release 3.22.3
Changes in release 3.22.2
Changes in release 3.22.1
Changes in release 3.22.0
Changes in release 3.21.x
Changes in release 3.21.33
Changes in release 3.21.32
Changes in release 3.21.31
Changes in release 3.21.30
Changes in release 3.21.29
Changes in release 3.21.28
Changes in release 3.21.27
Changes in release 3.21.26
Changes in release 3.21.25
Changes in release 3.21.24
Changes in release 3.21.23
Changes in release 3.21.22
Changes in release 3.21.21a
Changes in release 3.21.21
Changes in release 3.21.20
Changes in release 3.21.19
Changes in release 3.21.18
Changes in release 3.21.17
Changes in release 3.21.16
Changes in release 3.21.15
Changes in release 3.21.14b
Changes in release 3.21.14a
Changes in release 3.21.13
Changes in release 3.21.12
Changes in release 3.21.11
Changes in release 3.21.10
Changes in release 3.21.9
Changes in release 3.21.8
Changes in release 3.21.7
Changes in release 3.21.6
Changes in release 3.21.5
Changes in release 3.21.4
Changes in release 3.21.3
Changes in release 3.21.2
Changes in release 3.21.0
Changes in release 3.20.x
Changes in release 3.20.18
Changes in release 3.20.17
Changes in release 3.20.16
Changes in release 3.20.15
Changes in release 3.20.14
Changes in release 3.20.13
Changes in release 3.20.11
Changes in release 3.20.10
Changes in release 3.20.9
Changes in release 3.20.8
Changes in release 3.20.7
Changes in release 3.20.6
Changes in release 3.20.3
Changes in release 3.20.0
Changes in release 3.19.x
Changes in release 3.19.5
Changes in release 3.19.4
Changes in release 3.19.3
Appendix G Known errors and design deficiencies in MySQL
Appendix H MySQL and the future (The TODO)
Things that should be in 4.0
Things that must be done in the real near future
Things that have to be done sometime
Some things we don't have any plans to do
Appendix I Comments on porting to other systems
Debugging a MySQL server
Compiling MYSQL for debugging.
Creating trace files
Debugging mysqld under gdb
Using a stack trace
Using log files to find cause of errors in mysqld
Making a test case when you experience table corruption
Debugging a MySQL client
The DBUG package
Locking methods
Comments about RTS threads
Di erences between di erent thread packages
Appendix J Description of MySQL regular expression syntax
Appendix K What is Unireg?
Appendix L GNU General Public License
Appendix M GNU Library General Public License
SQL command, type and function index
Concept Index







Download the file decompressor 7-zip.
Download the PDF reader Foxit PDF Reader.




TutorialsPDF.com © 2008 - This work is licensed under a Creative Commons License.