Previous Page
Next Page

What Is MySQL?

In the previous chapter you learned about databases and SQL. As explained, it is the database software (DBMS or Database Management System) that actually does all the work of storing, retrieving, managing, and manipulating data. MySQL is a DBMS; that is, it is database software.

MySQL has been around for a long time, and is now installed and in use at millions of installations worldwide. Why do so many organizations and developers use MySQL? Here are some of the reasons:

  • Cost MySQL is open-source, and is usually free to use (and even modify) the software without paying for it.

  • Performance MySQL is fast (make that very fast).

  • Trusted MySQL is used by some of the most important and prestigious organizations and sites, all of whom entrust it with their critical data.

  • Simplicity MySQL is easy to install and get up and running.

In fact, the only real technical criticism of MySQL is that it has not always supported the functionality and features offered by other DBMSs. But as new features are added to each new version, this is changing.

Client-Server Software

DBMSs fall into two categories: shared filebased and client-server. The former (which include products such as Microsoft Access and FileMaker) are designed for desktop use and are generally not intended for use on higher-end or more critical applications.

Databases such as MySQL, Oracle, and Microsoft SQL Server are client-serverbased databases. Client-server applications are split into two distinct parts. The server portion is a piece of software that is responsible for all data access and manipulation. This software runs on a computer called the database server.

Only the server software interacts with the data files. All requests for data, data additions and deletions, and data updates are funneled through the server software. These requests or changes come from computers running client software. The client is the piece of software with which the user interacts. If you request an alphabetical list of products, for example, the client software submits that request over the network to the server software. The server software processes the request; filters, discards, and sorts data as necessary; and sends the results back to your client software.


How Many Computers? The client and server software may be installed on two computers or on one computer. Regardless, the client software communicates with the server software for all database interaction, be it on the same machine or not.

All this action occurs transparently to you, the user. The fact that data is stored elsewhere or that a database server is even performing all this processing for you is hidden. You never need to access the data files directly. In fact, most networks are set up so that users have no access to the data, or even the drives on which it is stored.

Why is this significant? Because to work with MySQL you'll need access to both a computer running the MySQL server software and client software with which to issue commands to MySQL:

  • The server software is the MySQL DBMS. You can be running a locally installed copy, or you can connect to a copy running a remote server to which you have access.

  • The client can be MySQL-provided tools, scripting languages (such as Perl), web application development languages (such as ASP, ColdFusion, JSP, and PHP), programming languages (such as C, C++, and Java), and more.

MySQL Versions

Client tools are revisited in a moment. First, a quick word about DBMS versions.

The current version of MySQL is version 5 (although MySQL 3 and 4 are in use in many organizations). Here are the major changes introduced in recent revisions:

  • 4 InnoDB engine adding support for transactions and more (Chapter 26, "Managing Transaction Processing"), unions (Chapter 17, "Combining Queries"), improved full text searching (Chapter 18, "Full-Text Searching"), and more.

  • 4.1 Significant additions to function libraries, subqueries (Chapter 14, "Working with Subqueries"), integrated help, and more.

  • 5 Stored procedures (Chapter 23, "Working with Stored Procedures"), triggers (Chapter 25, "Using Triggers"), cursors (Chapter 24, "Using Cursors"), views (Chapter 22, "Using Views"), and more.

Versions 4.1 and 5 added significant functionality to MySQL, much of which is covered in the later chapters in this book.


Use 4.1 or Higher MySQL 4.1 introduced significant changes to the MySQL function libraries, and this book was written for use with that version or later. While much of the early content does indeed apply to MySQL 3 and 4, many of the examples will not work with those versions.


Version Requirements Noted Any chapter that requires a specific version of MySQL is clearly noted as such at the start of that chapter.


Beta Software At the time that this book goes to press, MySQL 5 is still in beta and is not yet final-release software. This does not mean that you cannot use MySQL 5, but it does mean that you should proceed with caution as the software might contain bugs or problems that have yet to be addressed.

Previous Page
Next Page