{"id":1697,"date":"2016-03-30T19:53:45","date_gmt":"2016-03-30T23:53:45","guid":{"rendered":"http:\/\/blog-dev.bezko.xyz\/?p=1697"},"modified":"2017-12-01T15:01:47","modified_gmt":"2017-12-01T20:01:47","slug":"how-to-install-mysql-on-ubuntu-16-04-lts","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/","title":{"rendered":"How to install MySQL on Ubuntu 16.04"},"content":{"rendered":"<h1>Installing MySQL on Ubuntu 16<\/h1>\n<p>MySQL installation on Ubuntu 16 is not very different from previous versions. Actually, the package names are the same and even the MySQL secure installation script is very similar.<\/p>\n<h2>GETTING STARTED<\/h2>\n<p>To complete this guide, you will need the following:<br \/>\n\u2022 1 Node (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">Cloud Server<\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\">Dedicated Servers<\/a>) with Ubuntu 16.04 LTS installed<\/p>\n<h2>Installation<\/h2>\n<div class=\"row\">\n<div class=\"col-lg-6\">\n<p>To install MySQL, first set apt-get to query the most up to date list of repositories by running an apt-get update.<\/p>\n<p><code>apt-get update<\/code><\/p>\n<p>We will install 3 packages: mysql-server, libmysqlclient-dev, python-mysqldb. Mysql-server is the main MySQL package, libmysqlclient-dev is the MySQL development library and python-mysqldb is the python interface for MySQL. While the mysql-server package is essential, the others are optional and listed there as they may be useful for most usage. The command is as follow:<\/p>\n<p><code>apt-get install mysql-server libmysqlclient-dev python-mysqldb<\/code><\/p>\n<\/div>\n<div class=\"col-lg-6\">\n<div class=\"videoWrapper\">\n<iframe src=\"https:\/\/www.youtube.com\/embed\/8XmD78sbwfY\" frameborder=\"0\" gesture=\"media\" allow=\"encrypted-media\" allowfullscreen><\/iframe>\n<\/div>\n<\/div>\n<\/div>\n<p>During package installation, you will have a prompt asking you for a new root password. You will need that password when login in to MySQL as the super user.<\/p>\n<p>Once the installation process is finished, you may want to secure your MySQL, especially when used in production. To do that, there is a script called mysql_secure_installation which you can call from the command line, no other utilities necessary.<\/p>\n<p><code>mysql_secure_installation<\/code><\/p>\n<p>The script will ask several questions. The root password would not need to be changed. However, it is recommended to remove anonymous users, disallow remote login if you are not going to query the server remotely, remove the test database and reload the privilege on tables.<\/p>\n<p>Once that\u2019s finished, you can now login to mysql in command line. To do so, use the following command:<\/p>\n<p><code>mysql -u root -p<\/code><\/p>\n<p>Enter your password and you will now be logged into the MySQL command line client.<\/p>\n<h2>Conclusion<\/h2>\n<p>Your MySQL is now ready for production use. Go revolutionize the world!<br \/>\nIf you enjoyed this article, please share, comment and let us know what other subjects you would like us to tackle next. <\/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> Learn how to properly install MySQL on Ubuntu 16.04 LTS<!-- 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-1697","post","type-post","status-publish","format-standard","hentry","category-database","operating_system-ubuntu-16-04"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to install MySQL on Ubuntu 16.04 - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to install MySQL on your Ubuntu 16.04 server. Read now &amp; Try this popular database management system !\" \/>\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\/how-to-install-mysql-on-ubuntu-16-04-lts\/\" \/>\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 on Ubuntu 16.04 - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will show you how to install MySQL on your Ubuntu 16.04 server. Read now &amp; Try this popular database management system !\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-30T23:53:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-01T20:01:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/\",\"name\":\"How to install MySQL on Ubuntu 16.04 - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\"},\"datePublished\":\"2016-03-30T23:53:45+00:00\",\"dateModified\":\"2017-12-01T20:01:47+00:00\",\"author\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will show you how to install MySQL on your Ubuntu 16.04 server. Read now & Try this popular database management system !\",\"breadcrumb\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.globo.tech\/learning-center\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install MySQL on Ubuntu 16.04\"}]},{\"@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 on Ubuntu 16.04 - Globo.Tech","description":"This tutorial will show you how to install MySQL on your Ubuntu 16.04 server. Read now & Try this popular database management system !","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\/how-to-install-mysql-on-ubuntu-16-04-lts\/","og_locale":"en_US","og_type":"article","og_title":"How to install MySQL on Ubuntu 16.04 - Globo.Tech","og_description":"This tutorial will show you how to install MySQL on your Ubuntu 16.04 server. Read now & Try this popular database management system !","og_url":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/","og_site_name":"Globo.Tech","article_published_time":"2016-03-30T23:53:45+00:00","article_modified_time":"2017-12-01T20:01:47+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/","url":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/","name":"How to install MySQL on Ubuntu 16.04 - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-03-30T23:53:45+00:00","dateModified":"2017-12-01T20:01:47+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will show you how to install MySQL on your Ubuntu 16.04 server. Read now & Try this popular database management system !","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-mysql-on-ubuntu-16-04-lts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How to install MySQL on Ubuntu 16.04"}]},{"@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\/1697","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=1697"}],"version-history":[{"count":14,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/1697\/revisions"}],"predecessor-version":[{"id":3926,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/1697\/revisions\/3926"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=1697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=1697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=1697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}