Header

How to install Mysql 5.6 on Ubuntu 18.04 LTS | vetechno

How to install Mysql 5.6 on Ubuntu 18.04 LTS
How to install Mysql 5.6 on Ubuntu 18.04 LTS

 

MySQL is one of the most popular open-source RDMS (relational database management system) which is easy to use, fast, scalable, and an integral part of the popular LEMP and LAMP stacks.

In this tutorial, we will show you how to install and secure MySQL 5.6 on an Ubuntu 18.04 LTS machine.

Prerequisites:-

Make sure you are logged in as a user with sudo privileges .

Also Read:- How to install MySQL 5.5 on Ubuntu 20.04 LTS.

Also Read:- Uninstall or Remove MySql 5.7 from Ubuntu 20.04 LTS.

Installing MySQL 5.6 on Ubuntu 18.04 LTS

First of all you have to add a repository in  /etc/apt/sources. list .

Below are the step by step commands that you have to follow for installing MySql 5.6


sudo add-apt-repository 'deb http://kr.archive.ubuntu.com/ubuntu xenial main'

Note:- if above repository is not working then use below the repo 


sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'

Now Update Ubuntu 18.04


sudo apt update

Install mysql 5.6


sudo apt-get install mysql-server-5.6

Create a mysql.sock file


sudo touch /var/run/mysqld/mysql.sock

Give ownership to mysqld file


sudo chown mysql:mysql /var/run/mysqld

Stop mysql service


sudo /etc/init.d/mysql stop

Stat mysql service


sudo /etc/init.d/mysql start

Check status of mysql service


sudo service mysql status

Login to mysql 5.6 server


mysql -u root -p



YouTube link:- How to install MySQL 5.6 on Ubuntu 18.04 LTS

Also Read:- How to install MySQL 5.5 on Ubuntu 20.04 LTS.

Also Read:- Uninstall or Remove MySql 5.7 from Ubuntu 20.04 LTS.

That's it you have successfully installed MySQL 5.6 on Ubuntu 18.04 LTS machine. If you like this post then please comments us we will be very happy. Please feel free to contact us.

Post a Comment

1 Comments

If you have any doubts, Please let me know.
Note : - Please do not enter any spam link in the comment box.