I recently upgraded to Ubuntu 16.04. Unfortunately I need to work MySQL 5.5 or 5.6. I tried many solutions to have MySQL 5.5 or 5.6 run on Ubuntu 16.04 like this Install MySql 5.6 on Ubuntu 16.04 .
But none of them is working.
Ubuntu detect the unmet dependencies but says "but it is not going to be installed" for 5.5 or says Package 'mysql-server-5.6' has no installation candidate…
Is it not possible to force an earlier version of MySQL on Ubuntu? Why is that?
Best Answer
Step by step guide* to install mysql 5.5.x on Ubuntu 16.04 Xenial-Xerus. Please see this documentation
OR
See steps below:
Installing MySQL 5.5.51 on Ubuntu 16.06
Uninstall any existing version of MySQL
Delete the MySQL profile
Automatically uninstall mysql
Download version 5.5.51 from MySQL site
Add
mysql
user groupAdd
mysql
(not the current user) tomysql
user groupExtract
mysql-5.5.51-linux2.6-x86_64.tar.gz
to/usr/local
Create
mysql
folder in/usr/local
Set
mysql
directory owner and user groupInstall the required lib package
Execute mysql installation script
Set mysql directory owner from outside the mysql directory
Set data directory owner from inside mysql directory
Copy the mysql configuration file
Start mysql
Initialize root user password
Start mysql server
Stop mysql server
Check status of mysql
Enable myql on startup
Disable mysql on startup (Optional)
Add mysql path to the system
Now directly use the command below to start mysql
PS: One needs to reboot in order for the changes to take place.
Based on a Chinese blog