MySQL beginner tutorial


I am writing this basic MySQL tutorial to provides some basic hands on to the student  and developers. My aim to writing this tutorial to provide some basic and quick learning of Data Base Management System(DBMS).

Firstly I will tell you about MySQL.

What is MySQL?

MySQL is an Relational Data Base Management System (DBMS) which is used to store and manage the application data.
MySQL works as Data Base server, its mean MySQL is a server application.

Now I am going to Explains some terminology that will clear your concept.

What is Data ?

Data is just fact that can be gathered and stored and have implicit meaning, like Name of students is a data.

What is DataBase ?

Data Base is something in which we store data, means provide some base to store data, like File can be some form of data base to store the students Name.

What is DBMS ?

DBMS is a collection of program that helps to create database and manage it efficiently.

First thing which you need to play with MySQL server, is installing the MySQL in your system.

The link given below provides you steps to install MySQL server in Linux/ubuntu.

Install MySQL in ubuntu

After installing MySQL successfully, the first thing which you need is MySQL client.

Since I am already tell you that MySQL is a server, so to use it you required some client program that can connect you to MySQL server.

There are many MySQL client programs, some are GUI based and some are command based client.

I advised you if you are a newbie use command line MySQL client because if you use GUI based client initially some concept may not be clear.

When you installed MySQL server is come up with MySQL client program also. So there is no need to install MySQL client.

I hope, you  have successfully installed MySQL sever and MySQL client program to your machine.

If you have any problem during installation you can type your problem in comment section.

So Now you have successfully installed MySQL programs, server and client both.

Now we see how to connect with MySQl server using MySQL client-

Step 1. Just open your Linux terminal

Step 2. Write the following command to connect the MySQL server from your client

mysql -u username -p  [enter key] // replace username string to your user name
Enter password:  // provide your password

If every thing goes successfully you can connect to MySQL server.

When we install MySQL server its come with some its own data base which it uses internally, so just play with MySQL.

Type the following command

SHOW databases;    // this command list all the data bases in MySQL

you look something like this ---

mysql> show databases; +----------------------------------+
| Database                    |
| information_schema   |
| mysql                          |
| performance_schema |
| phpmyadmin               |
| sys                               |
| test                              |
8 rows in set (0.00 sec)
Congrats! now successfully run your first command.

In next tutorial I will provide you some basic command.

No comments:

Post a Comment