w3resource logo


Introduction to MySQL

MySQL Tutorial

rating Average rating 7 out of 10. Total 176 users rated.

<<PreviousNext>>

Introduction

MySQL is (as of July 2013) the world's most widely used open-source relational database management system (RDBMS), enabling the cost-effective delivery of reliable, high-performance and scalable Web-based and embedded database applications. It is widely-used as the database component of LAMP (Linux, Apache, MySQL, Perl/PHP/Python) web application software stack.

MySQL was developed by Michael Widenius and David Axmark in 1994. Presently MySQL is maintained by Oracle (formerly Sun, formerly MySQL AB).

MySQL tutorial of w3resource is a comprehensive tutorial to learn MySQL(5.6). We have hundreds of examples covered, often with PHP code. This helps you to learn how to create PHP-MySQL based web applications.

Production Releases MySQL 5.6 : Latest General Availability (Production) release

Table of contents

What is MySQL?

MySQL Editions

Who uses MySQL

Programming & Front ends tools

Key features of MySQL

w3resource MySQL tutorials

What is MySQL

  • MySQL is a database management system.
  • MySQL databases are relational.
  • MySQL software is Open Source.
  • The MySQL Database Server is fast, reliable, scalable, and easy to use.
  • MySQL Server works in client/server or embedded systems.
  • Initial release : 23 May 1995
  • Current stable release : 5.6.13 / 30 July 2013
  • Written in : C, C++
  • Operating system : Cross-platform
  • Available in : English
  • License of MySQL is available under GNU General Public License (version 2) or proprietary EULA.
Go Top

MySQL Editions

There are five types MySQL editions.

  • MySQL Enterprise Edition : This edition includes the most comprehensive set of advanced features, management tools and technical support to achieve the highest levels of MySQL scalability, security, reliability, and uptime.
  • MySQL Standard Edition : This edition enables you to deliver high performance and scalable Online Transaction Processing (OLTP) applications. It provides the ease of use that has made MySQL famous along with industrial-strength performance and reliability.
  • MySQL Classic Edition : This edition is the ideal embedded database for ISVs, OEMs and VARs developing read-intensive applications using the MyISAM storage engine.
  • MySQL Cluster CGE : MySQL Cluster is a scalable, real-time, ACID-compliant database, combining 5 x 9s availability and open source technology. With a distributed, multi-master architecture and no single point of failure, MySQL Cluster scales horizontally on commodity hardware accessed via SQL and NoSQL APIs.
  • MySQL Embedded (OEM/ISV) : MySQL Database is a full-featured, zero-administration database that more than 3000 ISVs, OEMs, and VARs rely on to bring their products to market faster and make them more competitive.
Go Top

Who uses MySQL

  • Some of the most visited websites like Flickr, Facebook, Wikipedia, Google (not for search), YouTube.
  • Content Management Systems like WordPress, phpBB, Drupal, Joomla, TYPO3, MODx.
  • Last but not least, a large number of web developers across the world.

Programming

MySQL works on many system platforms, including AIX, BSDi, FreeBSD, HP-UX, eComStation, i5/OS, IRIX, Linux, Mac OS X, Microsoft Windows, NetBSD, Novell NetWare, OpenBSD, OpenSolaris, OS/2 Warp, QNX, Solaris, Symbian, SunOS, SCO OpenServer, SCO UnixWare, Sanos and Tru64. A port of MySQL to OpenVMS also exists.

Many programming languages with language-specific APIs include libraries access MySQL databases. These include Microsoft's Visual Studio, PHP, ASP, Cold Fusion, Java etc.

Go Top

Some of the widely used MySQL front ends (tools for managing MySQL)

The MySQL GUI Tools Bundle is a cross-platform open source suite of desktop applications, building and manipulating the data within MySQL databases Development on the GUI Tools bundle has stopped, The GUI Tools bundle has been replaced by MySQL Workbench with the beta releases of MySQL Workbench 5.2. Currently MySQL Workbench Team are working on Version 6.0. The first public beta, labeled version 6.0.2, was released on June 14, 2013.
There are lot of third-party free and proprietary graphical administration applications available that integrate with MySQL and users to work with database. Here are some third-party tools for managing MySQL :

Tools Description
phpMyAdmin Third party, Free, Web based
HeidiSQL Third party, Free, For Windows
Adminer Third party, Free
DBEdit Third party, Free
dbForge GUI Tools Third party, Free
Navicat Third party, Commercial
Maatkit Third party, Command line, free
MySQL Sandbox Third party, Command line, free
SQLBuddy A free Web-based front end, developed in PHP.
SQLyog Commercial, but a free 'community' edition is available.
Toad for MySQL Third party, free from Quest Software

Go Top

Key features of MySQL

  • MySQL follows ANSI SQL 99, the standard SQL.
  • Cross Platform.
  • Unicode support
  • ACID compliance
  • Stored procedures
  • Triggers
  • Cursors
  • Views
  • Information schema
  • Strict mode (ensures MySQL does not truncate or otherwise modify data to conform to an underlying data type, when an incompatible value is inserted into that type)
  • Independent storage engines
  • Transactions with the InnoDB and NDB Cluster storage engines; savepoints with InnoDB
  • SSL support
  • Query caching
  • Sub-SELECTs (i.e. nested SELECTs)
  • Replication support (i.e. Master-Master Replication & Master-Slave Replication) with one master per slave, many slaves per master
  • Full-text indexing and searching using MyISAM engine
  • Embedded database library
  • Shared-nothing clustering through MySQL Cluster
  • Support for hotbackup
  • Multiple storage engines, allowing one to choose the one that is most effective for each table in the application
  • Commit grouping, gathering multiple transactions from multiple connections together to increase the number of commits per second.
Go Top

Tutorial objectives

1. A short and concise description to help you to understand about the topic / MySQL command.

2. Syntax of the MySQL command with descriptions of all the parameters used.

3. Display of the actual table on which the MySQL command is being applied.

4. How that MySQL command can be executed with PHP.

5. Explanation of the code.

6. Output of the MySQL command when executed form windows command prompt.

7. Display of the output with PHP in a separate browser window.

8. After reading this largest third party online MySQL tutorial by w3resource, you will be able to install, manage and develop PHP-MySQL web applications by your own.

9. You may refer MySQL Documentation along with this tutorial.

We have a comprehensive, SQL TUTORIAL -2003 standard , which will help you to understand how to prepare queries to fetch data against various conditions.

Database Management System

If you are not habituated with database management system your can learn from the following :

Database Management System

Go Top



We have compiled a number of MySQL Questions and Answers. Check and assess you MySQL skill by visiting those questions and answers.

<<PreviousNext>>