Mysql Server Installation in Ubuntu

How to install mysql server install on ubuntu server using PPA Repository apt

This required 4 key steps that are updating the repository, install package for server and client, mysql configuration and login in using mysql client.

Step 1: Update the repository

This Step two part A and B, A if you want to install particular version and B is for current major version. 

Part A : (for a particular version mysql)
Download deb package this url : https://dev.mysql.com/downloads/repo/apt/ (using wget) and install the package.

sudo dpkg -i /PATH/version-specific-package-name.deb

Now Update your repository for mysql

sudo apt-get update

Part B : (for a major release version for current series)

Reconfigure the repository 

sudo dpkg-reconfigure mysql-apt-config

And update the repository

sudo apt-get update

Step 2: Install mysql-server and mysql-client

This is fairly simple and important we are going to download both server and client package from the server and install it as service in the system.

sudo apt-get install mysql-server mysql-client

When the install process is done the check the status of mysql service

sudo service mysql status

Step 3: Secure Config Mysql Instance

Now we need to config the root user for your mysql instance

sudo mysql_secure_installation

Step 4: Using mysql client to connect server 

Using your root user login into mysql-server

       mysql -uroot -p

Enjoy your mysql and Keep hacking 

Comments