Upgrade MySql 5.5 to 5.6 on Ubuntu 14.04

If you are already using MySql 5.5 and some new applications is requiring a newer version you can proceed a upgrade with the following steps

  1. Check if there is available a binary version for your operating system
  2. If you are using Ubuntu14.04 there is available a Mysql 5.6 version. If not, you have to register other repository
  3. Create a backup just in case somethings will go wrong
    mysqldump --lock-all-tables -u root -p --all-databases > dump.sql
  4. Upgrade
  5. sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install mysql-server-5.6
  6. If something was wrong until now you can remove previous version and separately install the new one.
  7. You can restore the information by
    mysql -u root -p < dump.sql