{"id":3573,"date":"2017-10-18T11:51:36","date_gmt":"2017-10-18T15:51:36","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=3573"},"modified":"2017-10-18T11:51:36","modified_gmt":"2017-10-18T15:51:36","slug":"install-mysql-5-7-debian-9","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/","title":{"rendered":"How to Install MySQL 5.7 on Debian 9"},"content":{"rendered":"<h1>How to Install MySQL 5.7 on Debian 9<\/h1>\n<div class=\"row\">\n<div class=\"col-lg-10\">\n<p><a rel=\"nofollow\" href=\"https:\/\/www.debian.org\/News\/2017\/20170617\">Debian 9<\/a> is the latest stable release in the Debian operating system line, which is an open source project based on Unix systems. The current release, given the codename Stretch, has several changes that impact user functionality and third-party application compatibility. Each major Debian release provides new packages, software updates, and comes with three years of support for the release; stable releases, such as Stretch, are released every two years.<\/p>\n<\/div>\n<div class=\"col-lg-2\"><a rel=\"nofollow\" href=\"https:\/\/www.debian.org\/\"><img decoding=\"async\" src=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2017\/10\/openlogo-75.jpg\" alt=\"Debian 9\" class=\"alignright size-full wp-image-3575\" \/><\/a><\/div>\n<\/div>\n<p>However, one major change from the previous Debian 8 release is the change from MySQL to MariaDB. With the new release, the previous instances of MySQL are being replaced by the equivalent instance of MariaDB. This guide will help you install MySQL 5.7 on a node running the Debian Stretch operating system.<\/p>\n<h2>Getting Started<\/h2>\n<p>To get started with installing the MySQL packages on Stretch, you need to have a cloud server or dedicated server node, whichever you prefer, with an current instance of Debian Stretch installed.<\/p>\n<p>Mentioned earlier, one of the biggest changes from the previous stable release to this release was the replacement of MySQL with MariaDB; MySQL was the default. However, it&#8217;s possible to install MySQL as the default database, replacing MariaDB, with an official MySQL repository.<\/p>\n<p>During this process, having root user access, sometimes called privileged access, may be necessary to complete the setup. You will be prompted to create a MySQL root password during installation as well.<\/p>\n<h2>Installing MySQL 5.7 on Debian 9<\/p>\n<h2>\n<p>The first step in installing the official MySQL instance is to go to <a rel=\"nofollow\" href=\"https:\/\/dev.mysql.com\/downloads\/repo\/apt\/\"> MySQL&#8217;s website<\/a>, find the correct .deb package, and download the .deb package.<\/p>\n<p>Now that the .deb package is downloaded, you will need to download it to your Debian server, following the below example:<br \/>\n<code>wget https:\/\/dev.mysql.com\/get\/mysql-apt-config_0.8.8-1_all.deb<\/code><\/p>\n<p>Once downloaded to your server, check the .deb package name, then install it with dpkg:<br \/>\n<code>ls mysql-apt-config_0.8.8-1_all.deb<\/code><\/p>\n<p>Follow the steps to complete the download of your .deb package:<br \/>\n<code>dpkg -i mysql-apt-config_0.8.8-1_all.deb<\/code><\/p>\n<p>During the installation, you will be prompted to select options for your install. Make sure to leave the default options in place, then click &#8220;OK&#8221;<\/p>\n<p>After the installation is complete, now you can update the package list:<br \/>\n<code>apt update<\/code><\/p>\n<p>When the above steps have completed, you are now ready to proceed with installing MySQL, both the server and the client. You will also receive a prompt, during setup, to create a MySQL root user password:<br \/>\n<code>apt install mysql-server mysql-client<\/code><\/p>\n<p>Once the installation of the MySQL server and MySQL client have completed, you need to enable the MySQL instance on your server, then start MySQL:<br \/>\n<code>systemctl enable mysql && systemctl start mysql<\/code><\/p>\n<p>Securing your MySQL installation is essential, so run the below script, leaving the default settings alone, to secure your MySQL server and client:<br \/>\n<code>mysql_secure_install<\/code><\/p>\n<h2>Conclusion<\/h2>\n<p>Congratulations! You&#8217;ve completed an install of MySQL 5.7 on your Debian 9 <a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\">cloud server<\/a> or <a href=\"https:\/\/www.globo.tech\/dedicated-server-hosting\">dedicated server<\/a> node. While installing this official MySQL instance, you&#8217;ve replaced the existing MariaDB instance; this makes MySQL the default database software. If you had success using this guide to update your current Debian release with the MySQL instance, please share it with others going through the same process. <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>How to Install MySQL 5.7 on Debian 9 Debian 9 is the latest stable release in the Debian operating system line, which is an open source project based on Unix systems. The current release, given the codename Stretch, has several changes that impact user functionality and third-party application compatibility. Each major Debian release provides new<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[],"class_list":["post-3573","post","type-post","status-publish","format-standard","hentry","category-database","operating_system-debian"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install MySQL 5.7 on Debian 9 - Globo.Tech<\/title>\n<meta name=\"description\" content=\"Debian 9 is the latest stable release in the Debian operating system line, which is an open source project based on Unix systems. To install MySQL 5.7 on ...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install MySQL 5.7 on Debian 9 - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"Debian 9 is the latest stable release in the Debian operating system line, which is an open source project based on Unix systems. To install MySQL 5.7 on ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-18T15:51:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2017\/10\/openlogo-75.jpg\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/\"},\"author\":{\"name\":\"GloboTech Communications\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"headline\":\"How to Install MySQL 5.7 on Debian 9\",\"datePublished\":\"2017-10-18T15:51:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/\"},\"wordCount\":504,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/wp-content\\\/uploads\\\/2017\\\/10\\\/openlogo-75.jpg\",\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/\",\"name\":\"How to Install MySQL 5.7 on Debian 9 - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/wp-content\\\/uploads\\\/2017\\\/10\\\/openlogo-75.jpg\",\"datePublished\":\"2017-10-18T15:51:36+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"Debian 9 is the latest stable release in the Debian operating system line, which is an open source project based on Unix systems. To install MySQL 5.7 on ...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/wp-content\\\/uploads\\\/2017\\\/10\\\/openlogo-75.jpg\",\"contentUrl\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/wp-content\\\/uploads\\\/2017\\\/10\\\/openlogo-75.jpg\",\"width\":75,\"height\":92},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/install-mysql-5-7-debian-9\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install MySQL 5.7 on Debian 9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#website\",\"url\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.globo.tech\\\/learning-center\\\/#\\\/schema\\\/person\\\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\\\/\\\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install MySQL 5.7 on Debian 9 - Globo.Tech","description":"Debian 9 is the latest stable release in the Debian operating system line, which is an open source project based on Unix systems. To install MySQL 5.7 on ...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/","og_locale":"en_US","og_type":"article","og_title":"How to Install MySQL 5.7 on Debian 9 - Globo.Tech","og_description":"Debian 9 is the latest stable release in the Debian operating system line, which is an open source project based on Unix systems. To install MySQL 5.7 on ...","og_url":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/","og_site_name":"Globo.Tech","article_published_time":"2017-10-18T15:51:36+00:00","og_image":[{"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2017\/10\/openlogo-75.jpg","type":"","width":"","height":""}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/#article","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/"},"author":{"name":"GloboTech Communications","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"headline":"How to Install MySQL 5.7 on Debian 9","datePublished":"2017-10-18T15:51:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/"},"wordCount":504,"commentCount":0,"image":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/#primaryimage"},"thumbnailUrl":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2017\/10\/openlogo-75.jpg","articleSection":["Database"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/","url":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/","name":"How to Install MySQL 5.7 on Debian 9 - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/#primaryimage"},"image":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/#primaryimage"},"thumbnailUrl":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2017\/10\/openlogo-75.jpg","datePublished":"2017-10-18T15:51:36+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"Debian 9 is the latest stable release in the Debian operating system line, which is an open source project based on Unix systems. To install MySQL 5.7 on ...","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/#primaryimage","url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2017\/10\/openlogo-75.jpg","contentUrl":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2017\/10\/openlogo-75.jpg","width":75,"height":92},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/install-mysql-5-7-debian-9\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How to Install MySQL 5.7 on Debian 9"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=3573"}],"version-history":[{"count":8,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3573\/revisions"}],"predecessor-version":[{"id":3583,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3573\/revisions\/3583"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=3573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=3573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=3573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}