Upgrading from MySQL 5.5 to MySQL 5.6 on Ubuntu 14.04

Published on Author craigzearfossLeave a comment
  1. Make a backup of the data in your existing database.
    mysqldump --lock-all-tables -u root -p --all-databases > dump.sql
  2. Update, upgrade and install MySql 5.6.
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install mysql-server-5.6
    • If you get a message like the following:
      The following packages have unmet dependencies:
      mysql-server-5.6 : Depends: mysql-client-5.6 (>= 5.6.31-0ubuntu0.14.04.2) but it is not going to be installed
      E: Unable to correct problems, you have held broken packages.

      Then you will need to run the following:

      sudo apt-get purge mysql-server-5.5 mysql-client-5.5
      sudo apt-get autoremove
      sudo apt-get install mysql-server-5.6 mysql-client-5.6
  3. Populate the database with the old data.

    mysql -u root -p < dump.sql


Leave a Reply

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