{"id":13877,"date":"2019-04-06T12:56:16","date_gmt":"2019-04-06T12:56:16","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13877"},"modified":"2019-04-06T12:56:16","modified_gmt":"2019-04-06T12:56:16","slug":"how-to-install-mysql-8-0-in-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/06\/how-to-install-mysql-8-0-in-ubuntu-18-04\/","title":{"rendered":"How to Install MySQL 8.0 in Ubuntu 18.04"},"content":{"rendered":"<p><strong>MySQL<\/strong>\u00a0community server is a free open source, popular and cross-platform database management system. It supports both\u00a0<strong>SQL<\/strong>\u00a0and\u00a0<strong>NoSQL<\/strong>, and has a pluggable storage engine architecture. Additionally, it also comes with multiple database connectors for different programming languages, allowing you to develop applications using any of the well known languages, and many other features.<\/p>\n<p>It has many use cases under document storage, cloud, high availability systems, IoT (Internet of Things), hadoop, big data, data warehousing, LAMP or LEMP stack for supporting high-volume website\/apps and much more.<\/p>\n<p>In this article, we will explain a fresh installation of\u00a0<strong>MySQL 8.0<\/strong>\u00a0database system on\u00a0<strong>Ubuntu 18.04 Bionic Beaver<\/strong>. Before we move onto the actual installation steps, let\u2019s look at a summary of:<\/p>\n<h4>What\u2019s New in MySQL 8.0<\/h4>\n<ul>\n<li>The database now incorporates a transactional data dictionary.<\/li>\n<li>Comes with Atomic DDL statement support.<\/li>\n<li>Enhanced security and account management.<\/li>\n<li>Improvements to resource management.<\/li>\n<li>Several InnoDB enhancements.<\/li>\n<li>New type of backup lock.<\/li>\n<li>Default character set has changed to utf8mb4 from latin1.<\/li>\n<li>A couple of JSON enhancements.<\/li>\n<li>Comes with regular expression support using International Components for Unicode (ICU).<\/li>\n<li>New error logging which now uses the MySQL component architecture.<\/li>\n<li>Enhancements to MySQL replication.<\/li>\n<li>Supports common table expressions(both non-recursive and recursive).<\/li>\n<li>Has an enhanced optimizer.<\/li>\n<li>Additional window functions and more.<\/li>\n<\/ul>\n<h3>Step 1: Add MySQL Apt Repository<\/h3>\n<p>Luckily, there is an\u00a0<strong>APT<\/strong>\u00a0repository for installing the MySQL server, client, and other components. You need to add this MySQL repository to your system\u2019s package sources list; start by downloading the repository package using the\u00a0<a href=\"https:\/\/www.tecmint.com\/10-wget-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">wget tool<\/a>\u00a0from the command line.<\/p>\n<pre>$ wget -c https:\/\/dev.mysql.com\/get\/mysql-apt-config_0.8.10-1_all.deb \r\n<\/pre>\n<p>Then install the MySQL repository package using the following\u00a0<a href=\"https:\/\/www.tecmint.com\/dpkg-command-examples\/\" target=\"_blank\" rel=\"noopener\">dpkg command<\/a>.<\/p>\n<pre>$ sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb \r\n<\/pre>\n<p>Note that in the package installation process, you will be prompted to choose\u00a0<strong>MySQL<\/strong>\u00a0server version and other components such as cluster, shared client libraries, or the MySQL workbench that you want to configure for installation.<\/p>\n<p>MySQL server version\u00a0<code>mysql-8.0<\/code>\u00a0will be auto-selected, then scroll down to the last option\u00a0<code>Ok<\/code>\u00a0and click\u00a0<strong>[Enter]<\/strong>to finish the configuration and installation of the release package, as shown in the screenshot.<\/p>\n<div id=\"attachment_29327\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Configure-MySQL-APT-Config.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29327\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Configure-MySQL-APT-Config.png\" sizes=\"auto, (max-width: 882px) 100vw, 882px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Configure-MySQL-APT-Config.png 882w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Configure-MySQL-APT-Config-768x564.png 768w\" alt=\"Configure MySQL APT Config\" width=\"882\" height=\"648\" aria-describedby=\"caption-attachment-29327\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29327\" class=\"wp-caption-text\">Configure MySQL APT Config<\/p>\n<\/div>\n<h3>Step 2: Install MySQL Server in Ubuntu 18.04<\/h3>\n<p>Next, download the latest package information from all configured repositories, including the recently added\u00a0<strong>MySQL<\/strong>\u00a0repository.<\/p>\n<pre>$ sudo apt update\r\n<\/pre>\n<p>Then run the following command to install packages for the\u00a0<strong>MySQL<\/strong>\u00a0community server, client and the database common files.<\/p>\n<pre>$ sudo apt-get install mysql-server\r\n<\/pre>\n<div id=\"attachment_29328\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Install-MySQL-Server-in-Ubuntu.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29328\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Install-MySQL-Server-in-Ubuntu.png\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Install-MySQL-Server-in-Ubuntu.png 782w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Install-MySQL-Server-in-Ubuntu-768x357.png 768w\" alt=\"Install MySQL 8.0 in Ubuntu 18.04\" width=\"782\" height=\"363\" aria-describedby=\"caption-attachment-29328\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29328\" class=\"wp-caption-text\">Install MySQL 8.0 in Ubuntu 18.04<\/p>\n<\/div>\n<p>Through the installation process, you will be asked to enter a\u00a0<strong>password<\/strong>\u00a0for the\u00a0<strong>root<\/strong>\u00a0user for your MySQL server, re-enter the password to confirm it and press\u00a0<strong>[Enter]<\/strong>.<\/p>\n<div id=\"attachment_29329\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Set-MySQL-Root-Password.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29329\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Set-MySQL-Root-Password.png\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Set-MySQL-Root-Password.png 782w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Set-MySQL-Root-Password-768x357.png 768w\" alt=\"Set MySQL Root Password\" width=\"782\" height=\"363\" aria-describedby=\"caption-attachment-29329\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29329\" class=\"wp-caption-text\">Set MySQL Root Password<\/p>\n<\/div>\n<p>Next, the\u00a0<strong>MySQL<\/strong>\u00a0server authentication plugin configuration message will appear, read through it and use the right arrow to choose\u00a0<code>Ok<\/code>\u00a0and press\u00a0<strong>[Enter]<\/strong>\u00a0to continue.<\/p>\n<div id=\"attachment_29330\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Mysql-Authentication-Configuration.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29330\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Mysql-Authentication-Configuration.png\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Mysql-Authentication-Configuration.png 782w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Mysql-Authentication-Configuration-768x357.png 768w\" alt=\"MySQL Authentication Configuration\" width=\"782\" height=\"363\" aria-describedby=\"caption-attachment-29330\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29330\" class=\"wp-caption-text\">MySQL Authentication Configuration<\/p>\n<\/div>\n<p>Afterwards, you will be asked to select the default authentication plugin to use, then use the right arrow to choose\u00a0<code>Ok<\/code>\u00a0and press\u00a0<strong>[Enter]<\/strong>\u00a0to complete the package configuration.<\/p>\n<div id=\"attachment_29331\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Select-MySQL-Authentication-Plugin.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29331\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Select-MySQL-Authentication-Plugin.png\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Select-MySQL-Authentication-Plugin.png 782w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Select-MySQL-Authentication-Plugin-768x357.png 768w\" alt=\"Select MySQL Authentication Plugin\" width=\"782\" height=\"363\" aria-describedby=\"caption-attachment-29331\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29331\" class=\"wp-caption-text\">Select MySQL Authentication Plugin<\/p>\n<\/div>\n<h3>Step 3: Secure MySQL Server Installation<\/h3>\n<p>By default, the\u00a0<strong>MySQL<\/strong>\u00a0installation is unsecure. To secure it, run the security script which comes with the binary package. You will be asked to enter the\u00a0<strong>root<\/strong>\u00a0password you set during the installation process. Then also choose whether to use the\u00a0<strong>VALIDATE PASSWORD<\/strong>\u00a0plugin or not.<\/p>\n<p>You can also change the\u00a0<strong>root<\/strong>\u00a0password you set before (as we have done in this example). Then enter\u00a0<code>yes\/y<\/code>\u00a0to the following security questions:<\/p>\n<ul>\n<li>Remove anonymous users? (Press\u00a0<strong>y|Y<\/strong>\u00a0for\u00a0<strong>Yes<\/strong>, any other key for No) :\u00a0<code>y<\/code><\/li>\n<li>Disallow root login remotely? (Press\u00a0<strong>y|Y<\/strong>\u00a0for\u00a0<strong>Yes<\/strong>, any other key for No) :\u00a0<code>y<\/code><\/li>\n<li>Remove test database and access to it? (Press\u00a0<strong>y|Y<\/strong>\u00a0for\u00a0<strong>Yes<\/strong>, any other key for No) :\u00a0<code>y<\/code><\/li>\n<li>Reload privilege tables now? (Press\u00a0<strong>y|Y<\/strong>\u00a0for\u00a0<strong>Yes<\/strong>, any other key for No) :\u00a0<code>y<\/code><\/li>\n<\/ul>\n<p>Launch the script by issuing the following command.<\/p>\n<pre>$ sudo mysql_secure_installation\r\n<\/pre>\n<div id=\"attachment_29332\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/secure-mysql-server-installation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29332\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/secure-mysql-server-installation.png\" alt=\"Secure MySQL Server Installation\" width=\"653\" height=\"704\" aria-describedby=\"caption-attachment-29332\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29332\" class=\"wp-caption-text\">Secure MySQL Server Installation<\/p>\n<\/div>\n<p>To further secure your MySQL server, read our article\u00a0<a href=\"https:\/\/www.tecmint.com\/mysql-mariadb-security-best-practices-for-linux\/\" target=\"_blank\" rel=\"noopener\">12 MySQL\/MariaDB Security Best Practices for Linux<\/a>.<\/p>\n<h3>Step 4: Managing MySQL Server via Systemd<\/h3>\n<p>On Ubuntu, after installing a package, it\u2019s service(s) are usually started automatically once the package is configured. You can check if the\u00a0<strong>MySQL<\/strong>\u00a0server is up and running using following command.<\/p>\n<pre>$ sudo systemctl status mysql\r\n<\/pre>\n<div id=\"attachment_29333\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/check-mysql-server-status.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29333\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/check-mysql-server-status.png\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/check-mysql-server-status.png 772w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/check-mysql-server-status-768x286.png 768w\" alt=\"Check MySQL Server Status\" width=\"772\" height=\"287\" aria-describedby=\"caption-attachment-29333\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29333\" class=\"wp-caption-text\">Check MySQL Server Status<\/p>\n<\/div>\n<p>If for one reason or the other, it isn\u2019t auto-started, use the commands below to start and enable it to start at system boot time, as follows.<\/p>\n<pre>$ sudo systemctl status mysql\r\n$ sudo systemctl enable mysql\r\n<\/pre>\n<h3>Step 5: Install Extra MySQL Products and Components<\/h3>\n<p>In addition, you can install extra\u00a0<strong>MySQL<\/strong>\u00a0components that you feel you need in order to work with the server, such as\u00a0<strong>mysql-workbench-community<\/strong>,\u00a0<strong>libmysqlclient18<\/strong>\u00a0and many others.<\/p>\n<pre>$ sudo apt-get update\r\n$ sudo apt-get install mysql-workbench-community libmysqlclient18\r\n<\/pre>\n<p>Finally, to access the\u00a0<strong>MySQL<\/strong>\u00a0shell, issue the following command.<\/p>\n<pre>$ sudo mysql -u root -p\r\n<\/pre>\n<div id=\"attachment_29334\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Connect-to-MySQL-Server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29334\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Connect-to-MySQL-Server.png\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Connect-to-MySQL-Server.png 772w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/05\/Connect-to-MySQL-Server-768x512.png 768w\" alt=\"Connect to MySQL Server\" width=\"772\" height=\"515\" aria-describedby=\"caption-attachment-29334\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29334\" class=\"wp-caption-text\">Connect to MySQL Server<\/p>\n<\/div>\n<p>For more information, read the\u00a0<a href=\"https:\/\/dev.mysql.com\/doc\/relnotes\/mysql\/8.0\/en\/\" target=\"_blank\" rel=\"nofollow noopener\">MySQL 8.0 Release Notes<\/a>.<\/p>\n<p>That\u2019s It! In this article, we have explained how to install\u00a0<strong>MySQL 8.0<\/strong>\u00a0in\u00a0<strong>Ubuntu 18.04 Bioni Beaver<\/strong>. If you have any questions or thoughts to share, use the comment form below to reach us.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/install-mysql-8-in-ubuntu\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL\u00a0community server is a free open source, popular and cross-platform database management system. It supports both\u00a0SQL\u00a0and\u00a0NoSQL, and has a pluggable storage engine architecture. Additionally, it also comes with multiple database connectors for different programming languages, allowing you to develop applications using any of the well known languages, and many other features. It has many use &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/06\/how-to-install-mysql-8-0-in-ubuntu-18-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Install MySQL 8.0 in Ubuntu 18.04&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13877","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13877"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13877\/revisions"}],"predecessor-version":[{"id":13878,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13877\/revisions\/13878"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}