Ubuntu 14.04 LTS doesn’t allow for MySQL 5.7 via the base repository. You must tell apt-get where to grab the latest version of MySQL. Here’s a cheat sheet on what to do and the order you need to do it in. But before I get into how I upgraded MySQL on my Ubuntu server, I’m going to tell you why I needed 5.7. MySQL 5.7 has some new triggers I’d like to use for logging CRUD, good enough reason right? Anyways, the upgrade went smooth and we only had a couple issues to resolve which I show you how to resolve in the list below. Good luck!
- Download the MySQL release package from here – http://dev.mysql.com/get/mysql-apt-config_0.6.0-1_all.deb
- sudo dpkg -i mysql-apt-config_0.6.0-1_all.deb
- sudo apt-get update
- sudo apt-get install mysql-server
- sudo mysql_upgrade -u root -p
- sudo service mysql status
- change /etc/passwd (this will fix an error when restarting mysql)
from
mysql:x:106:110:MySQL Server,,,:/nonexistent:/bin/false
to
mysql:x:106:110:MySQL Server,,,:/var/lib/mysql:/bin/false - remove “bind-address” from my.cnf (relevent for local installations, may not apply in your situation)
- Service mysql stop and then start