How to install Mysql 5.6 on Ubuntu 18.04 LTS
How to install Mysql 5.6 on Ubuntu 20.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 Ubuntu 20.04 LTS Operating System.

Prerequisites:-

  • Access to a terminal (Ctrl + Alt + T)

  • Network connection

  • A system running with Ubuntu 20.04 LTS

  • A user account 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.

How install MySQL 5.6 in Ubuntu 20.04 using terminal?

Step1:- 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 server.


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’

Step2:- Now Update the repository from below command


sudo apt update

Step3:- Install mysql 5.6 server


sudo apt-get install mysql-server-5.6

Step4:- Create a mysql.sock file


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

Step5:- Give ownership to mysqld file


sudo chown mysql:mysql /var/run/mysqld

Step6:- Stop mysql service


sudo /etc/init.d/mysql stop

Step7:- Stat mysql service


sudo /etc/init.d/mysql start

Step8:- Check status of mysql service


sudo service mysql status

Step9:- Login to mysql 5.6 server


mysql -u root -p

Step10. Check MySQL Version

mysql –version

OR

mysql -V

Practical Video is Available on YouTube


* How to install MySQL 5.6 on Ubuntu 18.04 LTS

Also Read:-

* How to install MySQL 5.5 on Ubuntu 20.04 LTS.
* Uninstall or Remove MySql 5.7 from Ubuntu 20.04 LTS.


Conclusion:

That’s it you have successfully installed MySQL 5.6 on Ubuntu 20.04 LTS Operating System.
Let us know if you are facing any issue while installing in the below comment box. We will happy to assist you.

Please feel free to contact us.

By Vikash Ekka

Hi All, My name is Vikash Ekka from India. I’m the founder and tech editor of https://www.vetechno.in. I have completed my Graduation in BCA. I love to write technical articles like Windows, Linux & MAC Tutorials, Tips, Tricks, How To fix, Tutorials About Ethical Hacking & Cyber Security Guide, and Software Review. Currently, I have been working as an IT professional since 2018.

3 thoughts on “Install mysql 5.6 ubuntu 20.04 LTS | vetechno”
  1. Successfully installed but one thing I can’t modify. my.cnf
    i added lines on every my.cnf i found
    [mysqld]
    innodb_buffer_pool_size = 6G

    but checking SHOW variables like ‘innodb_buffer_pool%’; it is still on its default value. no changes has ben made.

  2. SET GLOBAL innodb_buffer_pool_size = 2097152000, SESSION innodb_buffer_pool_size = 2097152000;
    executing this command doesn’t work also. it says Innodb read only.

  3. Hello,

    Thanks very much for this tutorial, I’m very new to Ubuntu and all went very well.

    I have a question:

    How do I make sure mysql, php-mysql and the apache dependencies wont upgrade if performing unattended upgrades ??

    At this time I can’t duplicate the server for testing purposes. Do you have any ready to use routine ?

    Thanks a lot
    David

Leave a Reply

Your email address will not be published. Required fields are marked *