{"id":619,"date":"2018-02-21T21:33:07","date_gmt":"2018-02-21T20:33:07","guid":{"rendered":"https:\/\/www.anginf.de\/?p=619"},"modified":"2018-02-25T00:54:19","modified_gmt":"2018-02-24T23:54:19","slug":"upgrade-ubuntu-14-04-5-lts-to-16-04-3-lts-mysql","status":"publish","type":"post","link":"https:\/\/www.anginf.de\/?p=619","title":{"rendered":"Upgrade Ubuntu 14.04.5 LTS to 16.04.3 LTS: mysql"},"content":{"rendered":"<p>Updating from 14.04.5 LTS to 16.04.3 LTS can be tricky in some details. The most parts will run fine during the update, but for mysql there simply isn&#8217;t a migration path from 5.5 to 5.7 directly.<\/p>\n<p>Before anything else, <strong>backup<\/strong> your data first!<\/p>\n<pre lang=\"bash\">\r\nmysqldump --lock-all-tables -u root -p --all-databases > backup.sql\r\n<\/pre>\n<p>First you&#8217;ll have to upgrade vom 5.5 to 5.6, this happens pretty straightforward via the provided packages:<\/p>\n<pre lang=\"bash\">\r\nsudo apt update\r\nsudo apt install mysql-server-5.6 mysql-client-5.6 mysql-server-core-5.6 mysql-client-core-5.6\r\n<\/pre>\n<p>The trouble is, that the packages for 5.7 are not available on Ubuntu 14.04.5 LTS. If you want to transfer the data from a host running 14.04.5 to another host running on 16.04.3, you&#8217;ll have to upgrade to 5.7 first. If you want to upgrade the host currently running your mysqld, you can just continue with <code>do-release-upgrade<\/code>, the upgrade to mysql 5.7 handles the database structure upgrade just fine.<\/p>\n<p>To upgrade to mysql 5.7, you&#8217;ll have to leave the supported upgrade path from ubuntu 14.04 and insert your own apt-source from mysql.<\/p>\n<p>Download the latest mysql-apt-config_w.x.y-z_all.deb from https:\/\/dev.mysql.com\/downloads\/repo\/apt\/, mine was <a href=\"https:\/\/dev.mysql.com\/get\/mysql-apt-config_0.8.9-1_all.deb\">mysql-apt-config_0.8.9-1_all.deb<\/a>.<\/p>\n<pre lang=\"bash\">\r\nsudo gdebi mysql-apt-config_0.8.9-1_all.deb\r\nsudo apt update\r\nsudo apt install mysql-server\r\nmysql_upgrade -u root -p\r\nsudo service mysql restart\r\n<\/pre>\n<p>If you get errors like &#8222;Couldn&#8217;t execute &#8218;SHOW VARIABLES LIKE &#8218;gtid\\_mode&#8220;: Native table &#8218;performance_schema&#8216;.&#8217;session_variables&#8216; has the wrong structure&#8220;, you forgot to restart your mysql-server.<\/p>\n<p>This answer from <a href=\"https:\/\/askubuntu.com\/questions\/750498\/mysql-5-5-update-to-mysql-5-7#750502\">askubuntu.com<\/a> helped me work out the details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Updating from 14.04.5 LTS to 16.04.3 LTS can be tricky in some details. The most parts will run fine during the update, but for mysql there simply isn&#8217;t a migration path from 5.5 to 5.7 directly. Before anything else, backup your data first! mysqldump &#8211;lock-all-tables -u root -p &#8211;all-databases > backup.sql First you&#8217;ll have to &hellip; <a href=\"https:\/\/www.anginf.de\/?p=619\" class=\"more-link\"><span class=\"screen-reader-text\">Upgrade Ubuntu 14.04.5 LTS to 16.04.3 LTS: mysql<\/span> weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-619","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts\/619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=619"}],"version-history":[{"count":3,"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts\/619\/revisions"}],"predecessor-version":[{"id":622,"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts\/619\/revisions\/622"}],"wp:attachment":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}