
My SQL Tutorial
-
Creating a Table & Inserting Records
-
Creating Table
-
Inserting Records 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
-
Using mysql in Batch Mode
-
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 Column
-
Using User-Defined Variables
-
Using Foreign Keys
-
Searching on Two Keys
-
Calculating Visits Per Day
-
Using AUTO_INCREMENT
-
Using MySQL with Apache
Introduction

MySQL is a most popular RDBMS, free and open-source software under the terms of the GNU General Public License, and is also available under a variety of proprietary licenses.
MySQL was owned and sponsored by the Swedish company MySQL AB, which was bought by Sun Microsystems (now Oracle Corporation). In 2010, when Oracle acquired Sun, Widenius forked the open-source MySQL project to create MariaDB
MySQL is a component of the LAMP web application software stack (and others), which is an acronym for Linux, Apache, MySQL, Perl/PHP/Python.
MySQL is used by many database-driven web applications, including Drupal, Joomla, phpBB, and WordPress. MySQL is also used by many popular websites, including Facebook, Flickr,MediaWiki, Twitter, and YouTube.
You can download the mysql from www.mysql.org current version or archieved versons.
Starting MySQL
After successful installation of MySQL (download mysql from www.mysql.org ) , you need to start My SQL.
Method 1 :
Click on Start -> All Programs -> My SQL -> My SQL Command Line Client
It will start My SQL client and you need to give user password, to connect it with the My SQL Server.
Method 2 :
Start shell or command prompt (cmd) , type the given command -
If the server runs on a machine other than the one where you log in, you will also need to specify a host name.
c:\> mysql -h host -u username -p
Enter password: ********
If everything OK, you should get information followed by a mysql> prompt:
c:\> mysql -h host -u user -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 25338 to server version: 5.5.62-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
If you are logging in on the same machine that MySQL is running on, you can omit the host, and simply use the following:
c:\> mysql -u username -p
Enter password: ********
After you have connected successfully, you can disconnect any time by typing QUIT (or \q) at the mysql> prompt:
mysql> QUIT
Bye