Databases MySQL

MySQL an introduction and basic tutorial

MySQL is a Open source database management systems. It ‘s a powerful database management system with a lot of flexibility. This tutorial covers basic introduction to MySQL. In this tutorial I’m using Centos operating system for installing MySQL.

Installing MySQL in centos

MySQL can be installed using yum repository, and can be installed using the below comment.

#yum install mysql-server


Once the installation is complete, you can start mysql using the below comment.

#/etc/init.d/mysqld start

No password is set by default during MySQL installation.

For setting up password for MySQL for the first time use mysqladmin to set root password

mysqladmin -u root password NEWPASSWORD

eg: mysqladmin –u root password Password123

Accessing MySQL Shell

MySQL prompt can be accessed using the below command

#mysql –u root –p

and enter the MySQL password created.


Now we are in MySQL prompt.

How to list databases?

type ‘show databases’ at mysql prompt.


How to create a database?

Syntax: create database <dbname>


How to access a database?

Syntax: use <dbname>


How to delete a database?

Syntax: drop database <dbname>


Databases technews

Most commonly used opensource databases

Almost all developers has his/her own favorite databases, here I’m going have a small insights on the commonly used Opensource databases.

Here’s the list of most commonly used Opensource databases

  • MySQL
  • PostgreSQl
  • MongoDB
  • SQLite

There are a  lot more databases, here I’m planning have a short intro on the above mentioned databases.


According to wikipedia,

“MySQL is the world’s most widely used open-source Relational Database Management Systems (RDMS) that runs as a server providing multi-user access to a number of databases.”

MySQLThe MySQL development project has made its source code available under the terms of the GNU General Public License.  MySQL was owned and sponsored by a Swedish company MySQLAB, now owned by Oracle Corporation.

MySQL downloads can be obtained from

The latest version of MySQL is MySQL 5.6, the latest whitepaper on MySQL can be obtained from


PostgreSQL is a powerful, opensource object-relational database system. It runs on all major operating systems, including Linux, Windows, Unix flavours such as AIX, BSD, HP-UX. It is fully ACID compliant, has full support for foreign keys, joins, views, triggers, and stored procedures (in multiple languages).

PostgreSQL It includes most SQL:2008 data types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video.

Some general PostgreSQL limits are included in the table below.

              Limit  Value
Maximum Database Size Unlimited
Maximum Table Size 32 TB
Maximum Row Size 1.6 TB
Maximum Field Size 1 GB
Maximum Rows per Table Unlimited
Maximum Columns per Table 250 – 1600 depending on column types
Maximum Indexes per Table Unlimited

PostgreSQL can be download here for free.


mongoMongoDB (from “humongous”) is an open-source document database, and the leading NoSQL database. Written in C++, MongoDB features:

  • Document-Oriented storage: JSON styled documents with dynamic schemas offer simplicity and power
  • Replication and High Availability
  • Auto -sharding: Scale without affecting functionality.
  • Querying: Rich, document based queries.
  • And more

Latest releases can be downloaded from here


sqliteSQLite is a software library that implements a self-containedserverless,zero-configurationtransactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world.

And the downloads can be obtained from here.