Tuesday 5 February 2013

How to install MySql Server & MySQL client on Ubuntu 12.10 Linux

MySQL is a fast, multi-threaded, multi-user, and robust SQL database server. It is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.

It is very easy and intuitive to install MySQL server on Windows. However, installing it on Linux is little different which most of people are not aware of. Today I am going to show you, How to install MySQL client and server on Ubuntu linux.

Installing MySQL Server:

1. Press Ctrl – Alt – T on your keyboard to open the terminal.

2. When terminal opens, then type the following command to start the installation process

   sudo apt-get install mysql-server

3. During the installation process you will be prompted to enter a password for the MySQL root user. This password will be used to connect to the MySql server. Enter the password.


4. Once the installation is complete, the MySQL server should be started automatically. You can also run the following command from a terminal prompt to check whether the MySQL server is running:

   sudo netstat -tap | grep mysql

When you run this command, you should see the following line or something similar:
    tcp     0   0 localhost:mysql      *:*                  LISTEN   1021/mysqld

5. If the server is not running correctly, you can type the following command to start it:

    sudo service mysql restart

To stop the server at any time, type the following command from terminal.

    sudo netstat -tap | grep mysql

To start the MySql server, use following command.

sudo service mysql start

Installing MySQL Client: (MySql Workbench)

1. Open the Ubuntu Software Centre and type MySQL in the search box.

2. From the search results, you will see
MySQL Workbench. Select it and click on Install button. It will install the MySQL client tool on your machine.

3. To launch it, Click Dash Home and type MyS
QL. Now click on MySQL Workbench app to launch it.

For more information on MySQL Workbench visit http://www.mysql.com/products/workbench/

Now you can use this client program to connect to the local or remote MYSQL server. I would like to know from you guys which MySQ
L client you use and think is the best for Linux.

No comments:

Post a Comment