{"id":198,"date":"2022-07-25T05:15:32","date_gmt":"2022-07-25T05:15:32","guid":{"rendered":"https:\/\/formatswap.com\/blog\/?p=198"},"modified":"2023-09-15T20:47:07","modified_gmt":"2023-09-15T20:47:07","slug":"how-to-install-mysql-on-ubuntu-server-22-04-lts","status":"publish","type":"post","link":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/","title":{"rendered":"How to Install MySQL on Ubuntu Server 22.04 LTS"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"576\" loading=\"lazy\" src=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu-1024x576.jpg\" alt=\"install mysql splash image\" class=\"wp-image-242\" srcset=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu-1024x576.jpg 1024w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu-300x169.jpg 300w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu-768x432.jpg 768w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu-1536x864.jpg 1536w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>In this tutorial I will teach you how to download and install <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> server on Ubuntu 22.04 LTS. Additionally you will learn how to secure your installation and setup a root account. <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> is vital to have installed if you want to work with storing and receiving data on your website or web application. The first version of <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> was released on the 23rd of May 1995 by a Swedish company <a href=\"https:\/\/simple.wikipedia.org\/wiki\/Sun_Microsystems\" target=\"_blank\" rel=\"noreferrer noopener\">MySQLAB<\/a>. The other popular database manager <a href=\"https:\/\/en.wikipedia.org\/wiki\/MariaDB\" target=\"_blank\" rel=\"noreferrer noopener\">MariaDB<\/a> was created by the same company. Ever since <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> has grown to be one of the most popular database software&#8217;s on the web. Before we begin make sure you have a Ubuntu 20.04 server installed onto a computer or a virtual machine. Also don&#8217;t forget to install the <a href=\"https:\/\/en.wikipedia.org\/wiki\/OpenSSH\" target=\"_blank\" rel=\"noreferrer noopener\">openssh-server<\/a> package if it is not installed. This will give you the ability to ssh into the machine to setup <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Update and upgrade Ubuntu<\/h2>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo apt update &amp;&amp; sudo apt upgrade<\/code><\/pre>\n\n\n\n<p>The above commands will both update and upgrade your Ubuntu install to the latest package versions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install the MySQL Server &amp; Client to Ubuntu 20.04<\/h2>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo apt install mysql-server &amp;&amp; sudo apt install mysql-client<\/code><\/pre>\n\n\n\n<p>This will install both the <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> Server and the <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> Client to your machine. Unlike previous versions of Ubuntu Server you do not have to add any SQL repository&#8217;s before installing. This is because Ubuntu 22.04 LTS contains the packages in the standard system repository. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Confirm the installed MySQL version<\/h2>\n\n\n\n<p>To confirm which version of <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> you have installed run the following command. You will receive an output with the version number.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>mysql --version<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Update MySQL security settings<\/h2>\n\n\n\n<p>The default installation of <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> has several security issues. We need to run the following commands to fix these issues. <\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>This will open the <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> secure installation wizard. We need to answer a few questions in the wizard to continue. The first question will be:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>Would you like to setup VALIDATE PASSWORD COMPONENT?<\/code><\/pre>\n\n\n\n<p>Type in &#8220;Y&#8221; on the keyboard and press &#8220;Enter&#8221;. This will bring us to the next question which will have us enter a password validation policy.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><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:<\/code><\/pre>\n\n\n\n<p>Choose any one of these options. I will be using option #2 MEDIUM. After you type in the number press &#8220;Enter&#8221; and you will be brought to the following screen to set your password.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>Please set the password for root here.\n\nNew password:\n\nRe-enter new password:\n\nDo you wish to continue with the password provided?<\/code><\/pre>\n\n\n\n<p>Type in the password you would like to use and press enter. Next re-enter the password you have chosen. Finally type &#8220;Y&#8221; than press &#8220;Enter&#8221; to continue with the password provided. There is the possibility you will receive the following error.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost'                            as the authentication method used doesn't store authentication data in the MySQ                           L server. Please consider using ALTER USER instead if you want to change authent                           ication parameters.<\/code><\/pre>\n\n\n\n<p>If you get this error you will have to exit the script by pressing Ctrl+C. After you exit out login to <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo mysql<\/code><\/pre>\n\n\n\n<p>Then set the <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\">MySQL<\/a> password.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'SuperSecure1';<\/code><\/pre>\n\n\n\n<p><strong>*<\/strong>Change the password <strong>SuperSecure1<\/strong> to something secure<strong>*<\/strong> Afterwards exit the program by running <strong>exit;<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>exit;<\/code><\/pre>\n\n\n\n<p>Then just rerun the secure installation setup script again.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>The secure installation setup script will then ask you the following questions. Answer them as you see below.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>Enter the password for user root: type your root password and then press \"Enter\".\nChange the password for root? Press N, then press \"Enter\".\nRemove anonymous users? Press Y, then press \"Enter\".\nDisallow root login remotely? Press Y, then press \"Enter\".\nRemove test database and access to it? Press Y, then press \"Enter\".\nReload privilege tables now? Press Y, then press \"Enter\".<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Testing MySQL Server login<\/h2>\n\n\n\n<p>Once you have finished running the <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> secure installation script and have set up the root password you will need to test the login. This will allow us to login as the root user and setup a database ,tables and or users to go with it. Type the following to login.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo mysql -u root<\/code><\/pre>\n\n\n\n<p>Enter the root password you created in the above steps.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Managing your Ubuntu 22.04 MySQL service<\/h2>\n\n\n\n<p>There are several commands worth knowing for managing your <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> service. One of the most important is the command to check the status of the service.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl status mysql<\/code><\/pre>\n\n\n\n<p>This will generate an output similar to this. It will tell you if it is running or stopped. Furthermore it will also output any errors.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"805\" height=\"313\" loading=\"lazy\" src=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/Capture-systemctl-mysql.jpg\" alt=\"systemctl mysql output\" class=\"wp-image-236\" srcset=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/Capture-systemctl-mysql.jpg 805w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/Capture-systemctl-mysql-300x117.jpg 300w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/Capture-systemctl-mysql-768x299.jpg 768w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><\/figure>\n\n\n\n<p>You will also want to know how to stop the <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> service. You can do this with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl stop mysql<\/code><\/pre>\n\n\n\n<p>To start the <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> service run:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl start mysql<\/code><\/pre>\n\n\n\n<p>To restart the <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> service run:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl restart mysql<\/code><\/pre>\n\n\n\n<p>To disable the <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> service run:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl disable mysql<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Updating or removing MySQL on Ubuntu 20.04<\/h2>\n\n\n\n<p>If you are having any issues with your current version of <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> or just want the latest features, just run the update command. This will update <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> and your <a href=\"https:\/\/en.wikipedia.org\/wiki\/Linux\" target=\"_blank\" rel=\"noreferrer noopener\">Linux<\/a> system to the latest version.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo apt update &amp;&amp; sudo apt upgrade<\/code><\/pre>\n\n\n\n<p>If you no longer want <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> server installed you can easily remove it with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo apt autoremove --purge mysql-server<\/code><\/pre>\n\n\n\n<p>When you get the message &#8220;Do you want to continue?&#8221; just type &#8220;Y&#8221; than press &#8220;Enter&#8221;. <a href=\"https:\/\/en.wikipedia.org\/wiki\/MySQL\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> will be purged and uninstalled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Resources<\/h2>\n\n\n\n<p>View our list of <a href=\"https:\/\/formatswap.com\/blog\/programming\/the-top-5-programming-languages-to-learn-in-2022\/\" target=\"_blank\" rel=\"noreferrer noopener\">The Top 5 Programming Languages to Learn in 2022<\/a>.<\/p>\n\n\n\n<p>You may also like <a href=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/the-5-best-linux-distributions-to-install-in-2022\/\" target=\"_blank\" rel=\"noreferrer noopener\">The 5 Best Linux Distributions to Install in 2022<\/a>.<\/p>\n\n\n\n<p>If you want to learn how to generate images with neural networks click <a href=\"https:\/\/formatswap.com\/blog\/2022\/06\/27\/how-to-generate-images-from-text-prompts-with-vqgan-clip-python-and-tensorflow\/\" target=\"_blank\" rel=\"noreferrer noopener\">HERE<\/a>.<\/p>\n\n\n\n<p>View our <a href=\"https:\/\/formatswap.com\/blog\/category\/programming\/\" target=\"_blank\" rel=\"noreferrer noopener\">Programming Articles and Tutorials<\/a>.<\/p>\n\n\n\n<p>Learn more cool things in Linux with our <a href=\"https:\/\/formatswap.com\/blog\/category\/linux-tutorials\/\" target=\"_blank\" rel=\"noreferrer noopener\">Linux Tutorials<\/a>.<\/p>\n\n\n\n<p>View all of our available online tools and converters at <a href=\"https:\/\/formatswap.com\" target=\"_blank\" rel=\"noreferrer noopener\">Formatswap.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial I will teach you how to download and install MySQL server on Ubuntu 22.04 LTS. Additionally you will learn how to secure your installation and setup a root account. MySQL is vital to have installed if you want to work with storing and receiving data on your website or web application. The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[4],"tags":[8,26,14],"class_list":["post-198","post","type-post","status-publish","format-standard","hentry","category-linux-tutorials","tag-linux","tag-mysql","tag-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install MySQL on Ubuntu Server 22.04 LTS - Format Swap - Tech Tutorials<\/title>\n<meta name=\"description\" content=\"In this tutorial I will teach you how to download and install MySQL server on Ubuntu 22.04 server. MySQL is the go to choice for databases.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-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 Server 22.04 LTS - Format Swap - Tech Tutorials\" \/>\n<meta property=\"og:description\" content=\"In this tutorial I will teach you how to download and install MySQL server on Ubuntu 22.04 server. MySQL is the go to choice for databases.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/\" \/>\n<meta property=\"og:site_name\" content=\"Format Swap - Tech Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-25T05:15:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-15T20:47:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu-1024x576.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/#\\\/schema\\\/person\\\/3d01ee8e1e4f3718cfcc57eeb8ad6188\"},\"headline\":\"How to Install MySQL on Ubuntu Server 22.04 LTS\",\"datePublished\":\"2022-07-25T05:15:32+00:00\",\"dateModified\":\"2023-09-15T20:47:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/\"},\"wordCount\":777,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/my-sql-ubuntu-1024x576.jpg\",\"keywords\":[\"linux\",\"mysql\",\"tutorial\"],\"articleSection\":[\"Linux Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/\",\"url\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/\",\"name\":\"How to Install MySQL on Ubuntu Server 22.04 LTS - Format Swap - Tech Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/my-sql-ubuntu-1024x576.jpg\",\"datePublished\":\"2022-07-25T05:15:32+00:00\",\"dateModified\":\"2023-09-15T20:47:07+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/#\\\/schema\\\/person\\\/3d01ee8e1e4f3718cfcc57eeb8ad6188\"},\"description\":\"In this tutorial I will teach you how to download and install MySQL server on Ubuntu 22.04 server. MySQL is the go to choice for databases.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/#primaryimage\",\"url\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/my-sql-ubuntu.jpg\",\"contentUrl\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/my-sql-ubuntu.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-install-mysql-on-ubuntu-server-22-04-lts\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install MySQL on Ubuntu Server 22.04 LTS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/\",\"name\":\"Format Swap - Tech Tutorials\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/#\\\/schema\\\/person\\\/3d01ee8e1e4f3718cfcc57eeb8ad6188\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/formatswap.com\\\/blog\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCsIPLkRPTbbTaT8YX0Dh2-A\"],\"url\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install MySQL on Ubuntu Server 22.04 LTS - Format Swap - Tech Tutorials","description":"In this tutorial I will teach you how to download and install MySQL server on Ubuntu 22.04 server. MySQL is the go to choice for databases.","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:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/","og_locale":"en_US","og_type":"article","og_title":"How to Install MySQL on Ubuntu Server 22.04 LTS - Format Swap - Tech Tutorials","og_description":"In this tutorial I will teach you how to download and install MySQL server on Ubuntu 22.04 server. MySQL is the go to choice for databases.","og_url":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/","og_site_name":"Format Swap - Tech Tutorials","article_published_time":"2022-07-25T05:15:32+00:00","article_modified_time":"2023-09-15T20:47:07+00:00","og_image":[{"url":"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu-1024x576.jpg","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/#article","isPartOf":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/"},"author":{"name":"admin","@id":"https:\/\/formatswap.com\/blog\/#\/schema\/person\/3d01ee8e1e4f3718cfcc57eeb8ad6188"},"headline":"How to Install MySQL on Ubuntu Server 22.04 LTS","datePublished":"2022-07-25T05:15:32+00:00","dateModified":"2023-09-15T20:47:07+00:00","mainEntityOfPage":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/"},"wordCount":777,"commentCount":0,"image":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/#primaryimage"},"thumbnailUrl":"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu-1024x576.jpg","keywords":["linux","mysql","tutorial"],"articleSection":["Linux Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/","url":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/","name":"How to Install MySQL on Ubuntu Server 22.04 LTS - Format Swap - Tech Tutorials","isPartOf":{"@id":"https:\/\/formatswap.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/#primaryimage"},"image":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/#primaryimage"},"thumbnailUrl":"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu-1024x576.jpg","datePublished":"2022-07-25T05:15:32+00:00","dateModified":"2023-09-15T20:47:07+00:00","author":{"@id":"https:\/\/formatswap.com\/blog\/#\/schema\/person\/3d01ee8e1e4f3718cfcc57eeb8ad6188"},"description":"In this tutorial I will teach you how to download and install MySQL server on Ubuntu 22.04 server. MySQL is the go to choice for databases.","breadcrumb":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/#primaryimage","url":"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu.jpg","contentUrl":"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2022\/07\/my-sql-ubuntu.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-mysql-on-ubuntu-server-22-04-lts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/formatswap.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install MySQL on Ubuntu Server 22.04 LTS"}]},{"@type":"WebSite","@id":"https:\/\/formatswap.com\/blog\/#website","url":"https:\/\/formatswap.com\/blog\/","name":"Format Swap - Tech Tutorials","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/formatswap.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/formatswap.com\/blog\/#\/schema\/person\/3d01ee8e1e4f3718cfcc57eeb8ad6188","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/formatswap.com\/blog","https:\/\/www.youtube.com\/channel\/UCsIPLkRPTbbTaT8YX0Dh2-A"],"url":"https:\/\/formatswap.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/posts\/198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/comments?post=198"}],"version-history":[{"count":4,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/posts\/198\/revisions"}],"predecessor-version":[{"id":1474,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/posts\/198\/revisions\/1474"}],"wp:attachment":[{"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/media?parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/categories?post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/tags?post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}