DWQA QuestionsCategory: PHPInstall MySql 5.7 , MySql 5.6 or MySql 5.5 on ubuntu?
kandy Staff asked 6 years ago

Install MySQL 5.7
Use the following commands to install or upgrade MySQL 5.7 on your Ubuntu 16.04 and 15.10 systems. At the last update of this tutorial MySQL 5.7.9 is latest available MySQL release.

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ondrej/mysql-5.7
$ sudo apt-get update
$ sudo apt-get install mysql-server

Install MySQL 5.6
Use the following commands to install or upgrade MySQL 5.6 on your Ubuntu 16.04 and 15.10 systems. Currently this is the most popular version used.

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ondrej/mysql-5.6
$ sudo apt-get update
$ sudo apt-get install mysql-server

Verify installed version

[email protected]:~$ mysql --version 

mysql  Ver 14.14 Distrib 5.6.19, for debian-linux-gnu (x86_64) using  EditLine wrapper

Install MySQL 5.5
Use the following commands to install MySQL 5.5 on your Ubuntu 16.04 and 15.10 systems. If not specifically required, we recommend to use higher version of MySQL than 5.5.

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ondrej/mysql-5.5
$ sudo apt-get update
$ sudo apt-get install mysql-server
1 Answers
answered 6 years ago

Nice tutorial for Ubuntu, but I think Debian is much better than Ubuntu. It is also easier to install. For Debian based server, here is a great tutorial for installing MySQL and other packages from LAMP stack: https://www.cloudways.com/blog/install-lamp-on-debian/