{"id":1645,"date":"2020-11-14T22:40:35","date_gmt":"2020-11-14T22:40:35","guid":{"rendered":"https:\/\/linuxways.net\/?p=1645"},"modified":"2020-11-18T17:27:03","modified_gmt":"2020-11-18T17:27:03","slug":"how-to-install-the-latest-mysql-in-debian-10","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/debian\/how-to-install-the-latest-mysql-in-debian-10\/","title":{"rendered":"How to install the latest MySQL in Debian 10"},"content":{"rendered":"<p>MySQL is a well-known and open-source relational database management system that is pre-installed on Linux Debian\u2019s repository. MariaDB is available as the default database in Debian 10. Therefore, you need to install the MySQL server with all its dependencies on your Debian 10 system.<\/p>\n<p>In this article, we will give you a demo on how to install the MySQL server on Debian 10.<\/p>\n<h2><strong>Prerequisite<\/strong><\/h2>\n<p>You have sudo command access to run the administrative tasks.<\/p>\n<p>The following steps you need to follow to install the MySQL server on your Debian 10 system:<\/p>\n<h2><strong>Step 1: Open a terminal<\/strong><\/h2>\n<p>Click on the \u2018Activities\u2019 and then enter the terminal in the application search bar. Click on the terminal icon which will be displayed under the search bar:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"887\" height=\"295\" class=\"wp-image-1646\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-366.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-366.png 887w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-366-300x100.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-366-768x255.png 768w\" sizes=\"auto, (max-width: 887px) 100vw, 887px\" \/><\/p>\n<h2><strong>Step 2: Add or Configure MySQL Repository in Debian 10\u00a0<\/strong><\/h2>\n<p>For the installation of MySQL, you need to first add the MySQL apt repository to your Debian 10 system. For this purpose, go to the download page of the repository and grab the latest release of the MySQL package by using the below-mentioned wget command:<\/p>\n<pre>$ wget <a href=\"http:\/\/repo.mysql.com\/mysql-apt-config_0.8.13-1_all.deb\">http:\/\/repo.mysql.com\/mysql-apt-config_0.8.13-1_all.deb<\/a><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"390\" class=\"wp-image-1647\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-367.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-367.png 864w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-367-300x135.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-367-768x347.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/p>\n<p>Once the download of the latest release package is completed, install it by executing the following command with sudo privileges:<\/p>\n<pre>$ sudo apt install .\/mysql-apt-config_0.8.13-1_all.deb<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"613\" class=\"wp-image-1648\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-368.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-368.png 854w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-368-300x215.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-368-768x551.png 768w\" sizes=\"auto, (max-width: 854px) 100vw, 854px\" \/><\/p>\n<p>During the installation, the configuration menu will be displayed on the system where you can select the MySQL version that you want to install. Here, MySQL 8.0 is already selected. You can select other versions according to your server requirements. Now, select \u2018OK\u2019 by pressing the \u2018Tab\u2019 key\u00a0 and hit \u2018Enter\u2019 that is also shown in the below-displayed image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"513\" class=\"wp-image-1649\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-369.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-369.png 833w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-369-300x185.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-369-768x473.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><\/p>\n<h2><strong>Step 3: Update apt package list<\/strong><\/h2>\n<p>The recommended method is to update the repository packages list before installing any new application on your system. Therefore, update apt packages by using the following command:<\/p>\n<pre>$ sudo apt update<\/pre>\n<h2><strong>Step 4: Install MySQL\u00a0<\/strong><\/h2>\n<p>After updating the Debian apt repository, you will execute the below-given command to install the MySQL server packages on Debian 10:<\/p>\n<pre>$ sudo apt install mysql-server<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"856\" height=\"507\" class=\"wp-image-1650\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-370.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-370.png 856w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-370-300x178.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-370-768x455.png 768w\" sizes=\"auto, (max-width: 856px) 100vw, 856px\" \/><\/p>\n<p>Here, you will be asked to enter the MySQL root user password. Leave it blank that will set further in this article.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"851\" height=\"613\" class=\"wp-image-1651\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-371.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-371.png 851w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-371-300x216.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-371-768x553.png 768w\" sizes=\"auto, (max-width: 851px) 100vw, 851px\" \/><\/p>\n<p>In the next dialog, a message will display on the system in order to inform you about the MySQL 8.0 authentication.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"575\" class=\"wp-image-1652\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-372.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-372.png 857w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-372-300x201.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-372-768x515.png 768w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/p>\n<p>First, make sure that this authentication plugin is supported by your MySQL application, and then select the MySQL 8 authentication plugin.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"847\" height=\"555\" class=\"wp-image-1653\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-373.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-373.png 847w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-373-300x197.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-373-768x503.png 768w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/p>\n<h2><strong>Step 5: Check Status of MySQL Service\u00a0<\/strong><\/h2>\n<p>Once the installation process is completed, MySQL services will automatically start on your system. You can check service running status by typing the following command:<\/p>\n<pre>$ sudo systemctl status mysql<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"855\" height=\"615\" class=\"wp-image-1654\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-374.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-374.png 855w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-374-300x216.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-374-768x552.png 768w\" sizes=\"auto, (max-width: 855px) 100vw, 855px\" \/><\/p>\n<h2><strong>Step 6: Make secure installation of MySQL<\/strong><\/h2>\n<p>By executing the following command you can make the installation of the MySQL server more secure. Here, you need to set the root account password as follows:<\/p>\n<pre>$ sudo mysql_secure_installation<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"789\" class=\"wp-image-1655\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-375.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-375.png 866w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-375-300x273.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-375-768x700.png 768w\" sizes=\"auto, (max-width: 866px) 100vw, 866px\" \/><\/p>\n<p>In the next step, you will be prompted to configure the \u2018VALIDATE PASSWORD PLUGIN\u2019. This plugin is usually used to test the MySQL user\u2019s password strength. It consists of three levels for password validation: low, medium, and strong. If you don\u2019t want to configure this plugin the hit \u2018Enter\u2019.<\/p>\n<p>In the next stage, you will set the root user MySQL account password.<\/p>\n<p>Once you have been entered the root account password, the script will ask you to answer the following questions:<\/p>\n<ol>\n<li>Are you want to remove the anonymous user?<\/li>\n<li>Are you want to restrict the of root user\u00a0access to the local machine?<\/li>\n<li>Want to remove the test database?<\/li>\n<\/ol>\n<p>You should be response (yes) press \u2018y\u2019 to all questions in order to successfully complete the secure configuration.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"859\" height=\"713\" class=\"wp-image-1656\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-376.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-376.png 859w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-376-300x249.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-376-768x637.png 768w\" sizes=\"auto, (max-width: 859px) 100vw, 859px\" \/><\/p>\n<h2><strong>Step 7: Connect to the MySQL Server<\/strong><\/h2>\n<p>To work on the MySQL database, a necessary package MySQL client is required that is pre-installed as a dependency of the MySQL server package during the installation process.<\/p>\n<p>During the installation, if you have selected and installed the default authentication method for root login type then, run the following command:<\/p>\n<pre>$ sudo mysql<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"859\" height=\"309\" class=\"wp-image-1657\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-377.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-377.png 859w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-377-300x108.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-377-768x276.png 768w\" sizes=\"auto, (max-width: 859px) 100vw, 859px\" \/><\/p>\n<p>For legacy authentication method, type the following command on the terminal:<\/p>\n<pre>$ mysql -u root -p<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"303\" class=\"wp-image-1658\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-378.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-378.png 728w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-378-300x125.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/p>\n<p>You will be asked to enter the root account password which you have set in the above step mysql_secure_installation. Once you have entered the password, MySQL shell environment will display on the terminal.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>In this article, we have given the complete details about how to install MySQL server on Debian 10 Linux system. Moreover, we have also seen how to secure the installation and connect with the MySQL shell. Using the Validate password plugin you can make a more secure database MySQL password authentication.<\/p>\n<p><a href=\"https:\/\/linuxways.net\/de\/mint\/how-to-install-postgresql-on-linux-mint-20\/\">This post will help you in installing PostgreSQL on Linux Mint 20.<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>MySQL is a well-known and open-source relational database management system that is pre-installed on Linux Debian\u2019s repository. MariaDB is available as the default database in Debian 10. Therefore,&hellip;<\/p>","protected":false},"author":2,"featured_media":1663,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[17,27],"class_list":["post-1645","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian","tag-debian-10","tag-mysql"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/1645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=1645"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/1645\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/1663"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=1645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=1645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=1645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}