{"id":39569,"date":"2021-11-29T12:30:00","date_gmt":"2021-11-29T18:30:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=39569"},"modified":"2022-06-03T03:31:29","modified_gmt":"2022-06-03T08:31:29","slug":"how-to-install-mysql-database-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/","title":{"rendered":"How to Install MySQL Database on Ubuntu 20.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"742\" height=\"372\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-mysql-database-on-ubuntu-20.04.jpg\" alt=\"how to install mysql database on ubuntu 20.04\" class=\"wp-image-39672\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-mysql-database-on-ubuntu-20.04.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-mysql-database-on-ubuntu-20.04-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-mysql-database-on-ubuntu-20.04-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/figure>\n\n\n\n<p>MySQL is an open-source relational database management system (RDBMS), it&#8217;s widely used and part of the popular LAMP\/LEMP stacks. The data is organized in one or more tables in which the data types may be related to each other and MySQL uses SQL Structured Query Language to manage its data.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/installing-mysql-database-on-ubuntu-20.04.jpg\" alt=\"installing mysql database on ubuntu 20.04\" class=\"wp-image-39675\" width=\"123\" height=\"123\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/installing-mysql-database-on-ubuntu-20.04.jpg 1000w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/installing-mysql-database-on-ubuntu-20.04-300x300.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/installing-mysql-database-on-ubuntu-20.04-150x150.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/installing-mysql-database-on-ubuntu-20.04-768x768.jpg 768w\" sizes=\"(max-width: 123px) 100vw, 123px\" \/><\/figure><\/div>\n\n\n\n<p><br>Considering its part of the LAMP\/LEMP stack it is used by many database-driven web applications such as WordPress, Magento, Drupal, and Joomla.<br>Today we will install MySQL on our server and create a database and user with chosen permissions on this database, let&#8217;s get started!<\/p>\n\n\n\n<!--more-->\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d0f3cbe1624\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d0f3cbe1624\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#Step-1-Log-in-to-the-Server-Update-the-Server-OS-Packages\" >Step 1: Log in to the Server &amp; Update the Server OS Packages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#Step-2-Installing-MySQL\" >Step 2: Installing MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#Step-3-Configuring-MySQL\" >Step 3: Configuring MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#Step-4-Creating-MySQL-User-and-Database\" >Step 4: Creating MySQL User and Database<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span><strong>Prerequisites<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>For the purposes of this tutorial, we will use an <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noreferrer noopener\">Ubuntu20.04 VPS<\/a>.<\/li><li>Access to the root user account (or a user with sudo privileges)<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-1-log-in-to-the-server-update-the-server-os-packages\"><span class=\"ez-toc-section\" id=\"Step-1-Log-in-to-the-Server-Update-the-Server-OS-Packages\"><\/span>Step 1: Log in to the Server &amp; Update the Server OS Packages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>As always, first log in to your VPS via SSH:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh user@hostname<\/code><\/pre>\n\n\n\n<p>Once you are in, run the following commands to update the package index and upgrade all the installed packages to the latest available version.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update\nsudo apt-get upgrade<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-2-installing-mysql\"><span class=\"ez-toc-section\" id=\"Step-2-Installing-MySQL\"><\/span>Step 2: Installing MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can simply start the MySQL installation with the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install mysql-server<\/code><\/pre>\n\n\n\n<p>To verify if the installation has been successful&nbsp;and if MySQL is running on your server,&nbsp; you can execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo&nbsp;systemctl status mysql<\/pre>\n\n\n\n<p>We will configure MySQL and enhance its security with the mysql_secure_installation script.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-3-configuring-mysql\"><span class=\"ez-toc-section\" id=\"Step-3-Configuring-MySQL\"><\/span> Step 3: Configuring MySQL <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To run the security script, execute this command on your terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>This will start the script which will prompt a series of questions to configure the MySQL passwords and security on that instance.<\/p>\n\n\n\n<p>The first prompt is about the <strong>Validate Password Componen<\/strong>t, which we will install to ensure that all MySQL users follow the policy for complex passwords.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>VALIDATE PASSWORD COMPONENT can be used to test passwords\nand improve security. It checks the strength of password\nand allows the users to set only those passwords which are\nsecure enough. Would you like to setup VALIDATE PASSWORD component?\n\nPress y|Y for Yes, any other key for No: Y<\/code><\/pre>\n\n\n\n<p>The next prompt will ask for the policy level that you would like to use. You can choose the level of policy you like to use, for the purpose of this tutorial we will choose option &#8220;1&#8221;. Which means the password must consist of numeric, mixed case, and special characters and the password length must be equal or greater than 8.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>There are three levels of password validation policy:\n\nLOW    Length &gt;= 8\nMEDIUM Length &gt;= 8, numeric, mixed case, and special characters\nSTRONG Length &gt;= 8, numeric, mixed case, special characters and dictionary                  file\n\nPlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1\n1<\/code><\/pre>\n\n\n\n<p>After choosing the policy level, you can now set your new root password:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Please set the password for root here.\n\n\nNew password: \n\nRe-enter new password:<\/code><\/pre>\n\n\n\n<p>Insert &#8216;Y&#8217; in the following prompts in order to finish the installation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y\n\nRemove anonymous users? (Press y|Y for Yes, any other key for No) : Y\n\nDisallow root login remotely? (Press y|Y for Yes, any other key for No) : Y\n\nRemove test database and access to it? (Press y|Y for Yes, any other key for No) : Y\n\nReload privilege tables now? (Press y|Y for Yes, any other key for No) : Y<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-4-creating-mysql-user-and-database\"><span class=\"ez-toc-section\" id=\"Step-4-Creating-MySQL-User-and-Database\"><\/span>Step 4: Creating MySQL User and Database <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After the installation MySQL creates root user for which we created the password in the previous step. The root user has full privileges over the MySQL server, it can access every database, table and create\/drop or manage permission on the other MySQL users. <\/p>\n\n\n\n<p>You can log in to your MySQL server with the following command using the password you created previously:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<p>Now you can create a MySQL user which in our case we will call<strong> &#8216;dev&#8217;<\/strong>, please don&#8217;t forget to change <strong>&#8216;StrongPassword<\/strong>&#8216; with your own strong password:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nmysql&gt; CREATE USER 'dev'@'localhost' IDENTIFIED BY 'StrongPassword';<\/code><\/pre>\n\n\n\n<p>Run the following command to create a database &#8216;<strong>development<\/strong>&#8216;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nmysql&gt; CREATE DATABASE development;<\/code><\/pre>\n\n\n\n<p>To grant all permissions on the new database <strong>&#8216;development<\/strong>&#8216; to the user &#8216;<strong>dev<\/strong>&#8216; use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql&gt; GRANT ALL PRIVILEGES ON development.* TO 'dev'@'localhost';<\/code><\/pre>\n\n\n\n<p>The &#8216;*&#8217; sign in the command is a wildcard for all the tables under the database &#8216;development&#8217;.<\/p>\n\n\n\n<p>The command <strong>GRANT ALL<\/strong> will grant all privileges on the MySQL user &#8216;<strong>dev<\/strong>&#8216;, but only for the connections made from the &#8216;localhost&#8217;, if you want to grant the same permissions for the user &#8216;dev&#8217; for the remote connections also, you can use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nmysql&gt; CREATE USER 'dev'@'%' IDENTIFIED BY 'StrongPassword';\n\nmysql&gt; GRANT ALL PRIVILEGES ON development.* TO 'dev'@'%';\n<\/code><\/pre>\n\n\n\n<p>When you finish with setting up your MySQL permissions, make sure to reload all the privileges with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql&gt; FLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p>That\u2019s it! The creation of MySQL database and user on Ubuntu 20.04 has been completed.<\/p>\n\n\n\n<p>Of course, you don\u2019t need to install MySQL and create databases on Ubuntu 20.04 yourself if you use one of our fully managed <strong><a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">VPS Hosting<\/a><\/strong> services, in which case you can simply ask our expert Linux admins to install and secure it for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/installation-of-mysql-database-on-ubuntu-20.04.png\" alt=\"installation of mysql database on ubuntu 20.04\" class=\"wp-image-39677\" width=\"133\" height=\"133\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/installation-of-mysql-database-on-ubuntu-20.04.png 200w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/installation-of-mysql-database-on-ubuntu-20.04-150x150.png 150w\" sizes=\"(max-width: 133px) 100vw, 133px\" \/><\/figure><\/div>\n\n\n\n<p>P.S. If you liked this post on how to install MySQL and create a database on Ubuntu 20.04 please share it with your friends on the social networks by using the share shortcuts below, or simply leave a comment in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL is an open-source relational database management system (RDBMS), it&#8217;s widely used and part of the popular LAMP\/LEMP stacks. The &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install MySQL Database on Ubuntu 20.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#more-39569\" aria-label=\"Read more about How to Install MySQL Database on Ubuntu 20.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":39672,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1698],"tags":[41,1603,39,1839],"class_list":["post-39569","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-ubuntu","tag-database","tag-how-to-install","tag-mysql","tag-ubuntu-20-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install MySQL Database on Ubuntu 20.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"Learn how to install MySQL database on Ubuntu 20.04 with this useful tutorial, step by step guidance through the process.\" \/>\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.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/\" \/>\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 Database on Ubuntu 20.04 | RoseHosting\" \/>\n<meta property=\"og:description\" content=\"Learn how to install MySQL database on Ubuntu 20.04 with this useful tutorial, step by step guidance through the process.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-29T18:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:31:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-mysql-database-on-ubuntu-20.04.jpg?v=1635752781\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Install MySQL Database on Ubuntu 20.04 | RoseHosting\" \/>\n<meta name=\"twitter:description\" content=\"Learn how to install MySQL database on Ubuntu 20.04 with this useful tutorial, step by step guidance through the process.\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install MySQL Database on Ubuntu 20.04\",\"datePublished\":\"2021-11-29T18:30:00+00:00\",\"dateModified\":\"2022-06-03T08:31:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/\"},\"wordCount\":686,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/how-to-install-mysql-database-on-ubuntu-20.04.jpg\",\"keywords\":[\"database\",\"how to install\",\"mysql\",\"Ubuntu 20.04\"],\"articleSection\":[\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/\",\"name\":\"How to Install MySQL Database on Ubuntu 20.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/how-to-install-mysql-database-on-ubuntu-20.04.jpg\",\"datePublished\":\"2021-11-29T18:30:00+00:00\",\"dateModified\":\"2022-06-03T08:31:29+00:00\",\"description\":\"Learn how to install MySQL database on Ubuntu 20.04 with this useful tutorial, step by step guidance through the process.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/how-to-install-mysql-database-on-ubuntu-20.04.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/how-to-install-mysql-database-on-ubuntu-20.04.jpg\",\"width\":742,\"height\":372,\"caption\":\"how to install mysql database on ubuntu 20.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mysql-database-on-ubuntu-20-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install MySQL Database on Ubuntu 20.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install MySQL Database on Ubuntu 20.04 | RoseHosting","description":"Learn how to install MySQL database on Ubuntu 20.04 with this useful tutorial, step by step guidance through the process.","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.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install MySQL Database on Ubuntu 20.04 | RoseHosting","og_description":"Learn how to install MySQL database on Ubuntu 20.04 with this useful tutorial, step by step guidance through the process.","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2021-11-29T18:30:00+00:00","article_modified_time":"2022-06-03T08:31:29+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-mysql-database-on-ubuntu-20.04.jpg?v=1635752781","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_title":"How to Install MySQL Database on Ubuntu 20.04 | RoseHosting","twitter_description":"Learn how to install MySQL database on Ubuntu 20.04 with this useful tutorial, step by step guidance through the process.","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install MySQL Database on Ubuntu 20.04","datePublished":"2021-11-29T18:30:00+00:00","dateModified":"2022-06-03T08:31:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/"},"wordCount":686,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-mysql-database-on-ubuntu-20.04.jpg","keywords":["database","how to install","mysql","Ubuntu 20.04"],"articleSection":["Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/","name":"How to Install MySQL Database on Ubuntu 20.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-mysql-database-on-ubuntu-20.04.jpg","datePublished":"2021-11-29T18:30:00+00:00","dateModified":"2022-06-03T08:31:29+00:00","description":"Learn how to install MySQL database on Ubuntu 20.04 with this useful tutorial, step by step guidance through the process.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-mysql-database-on-ubuntu-20.04.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-install-mysql-database-on-ubuntu-20.04.jpg","width":742,"height":372,"caption":"how to install mysql database on ubuntu 20.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mysql-database-on-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install MySQL Database on Ubuntu 20.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=39569"}],"version-history":[{"count":9,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39569\/revisions"}],"predecessor-version":[{"id":39722,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39569\/revisions\/39722"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/39672"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=39569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=39569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=39569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}