/ mysql

Install MySQL in Debian

This post explains how to install MySQL in Debian without much fuss using apt package management tool.

Download this file from mysql site. You can choose the major version of the mysql server you want in the dialog box when asked.

Run the following commands:

sudo dpkg -i mysql-apt-config_x.x.x-xdebianx_all.deb
sudo apt-get update 
sudo apt-get install mysql-server 

The installation will prompt for mysql root password and whether you want to create the test database.

Once installation is over run   mysql -uroot -p<yourpassword> to run mysql client.

How Start/Stop MySQL Server

sudo service mysql status #check the status of the server
sudo service mysql stop  #Stop the server the server
sudo service mysql start  #Start the the server