{"id":2400,"date":"2023-04-13T20:53:16","date_gmt":"2023-04-13T20:53:16","guid":{"rendered":"https:\/\/draculaservers.com\/tutorials\/?p=2400"},"modified":"2023-06-06T06:59:06","modified_gmt":"2023-06-06T06:59:06","slug":"install-uninstall-mysql-linux","status":"publish","type":"post","link":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/","title":{"rendered":"How do I Install &#038; Uninstall MySQL in Linux?"},"content":{"rendered":"<p>MySQL is one of the most famous relational database management systems in the current market. The capabilities of this RDBMS are not only amazing but also quite user-friendly. Many people prefer MySQL over other alternatives available in the market. Often, installing MySQL and removing it from a Linux-based operating system can be quite daunting for new beginners. If that is the case, then this post will be your friend and guide you through the process.<\/p>\n<p>Let\u2019s Begin.<\/p>\n<h2 id=\"prerequisite\">Prerequisite<\/h2>\n<p>MySQL is often installed as a requirement with other applications and services that the user installs on a Linux operating system. You may already have MySQL installed on your machine. To check this, type the following command in the terminal:<\/p>\n<pre>mysql --version<\/pre>\n<p>If MySQL is not installed on your machine, follow the rest of the guide.<\/p>\n<hr \/>\n<h2 id=\"how-to-install-mysql-in-linux\">How to Install MySQL in Linux?<\/h2>\n<p>The first step for installing MySQL on your Linux machine is to update the packages list according to your distribution of Linux. If you are running the Ubuntu operating system, then the \u201capt\u201d packages list can be updated using the following command in the terminal:<\/p>\n<pre>sudo apt update<\/pre>\n<p>Once that is done, upgrading the packages to their newest version is also a good practice. For that, you can use the following command:<\/p>\n<pre>sudo apt upgrade -y<\/pre>\n<p>Once that is done, install MySQL Server using the following command:<\/p>\n<p><a href=\"https:\/\/ubuntu.com\/\" target=\"_blank\" rel=\"noopener\"><strong>For Ubuntu<\/strong><\/a>:<\/p>\n<pre>sudo apt install mysql-server<\/pre>\n<p><a href=\"https:\/\/www.centos.org\/\" target=\"_blank\" rel=\"noopener\"><strong>For CentOS<\/strong><\/a>:<\/p>\n<pre>sudo yum install mysql<\/pre>\n<p>When you execute the command, it will ask you for the <strong>root user\u2019s password<\/strong>. Therefore, provide the password and hit the enter key:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/1-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2401\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/1-3.png\" alt=\"\" width=\"983\" height=\"180\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/1-3.png 983w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/1-3-300x55.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/1-3-768x141.png 768w\" sizes=\"auto, (max-width: 983px) 100vw, 983px\" \/><\/a><\/p>\n<p>When you are prompted about the <strong>confirmation for download<\/strong>, type \u201c<strong>Y<\/strong>\u201d and then press the enter key again:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/2-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2402\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/2-3.png\" alt=\"\" width=\"980\" height=\"386\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/2-3.png 980w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/2-3-300x118.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/2-3-768x302.png 768w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><\/a><\/p>\n<p>After that, wait for the download and installation process to complete. And once it is done, you can <strong>verify its installation<\/strong> by checking its version using the following command:<\/p>\n<pre>mysql --version<\/pre>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/3-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2403\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/3-3.png\" alt=\"\" width=\"977\" height=\"79\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/3-3.png 977w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/3-3-300x24.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/3-3-768x62.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/a><\/p>\n<p>As you can see in the output images above, <strong>MySQL Server version 8<\/strong> has been installed on your Linux Distribution. However, this doesn\u2019t mean that MySQL service is running. To check that, run the following command in the terminal:<\/p>\n<pre>sudo systemctl status mysql<\/pre>\n<p>Running the command should give the following output:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/4-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2404\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/4-3.png\" alt=\"\" width=\"976\" height=\"447\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/4-3.png 976w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/4-3-300x137.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/4-3-768x352.png 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/a><\/p>\n<p>This means that the MySQL services are running. In case the output returns as \u201c<strong>Inactive<\/strong>,\u201d then you will have the run the following command:<\/p>\n<pre>sudo systemctl start mysql<\/pre>\n<p>Also, to make the MySQL service <strong>start at the time of OS boot<\/strong>, run the following command:<\/p>\n<pre>sudo systemctl enable mysql<\/pre>\n<p>Running this command will showcase the following result on the terminal:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/5-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2405\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/5-3.png\" alt=\"\" width=\"974\" height=\"144\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/5-3.png 974w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/5-3-300x44.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/5-3-768x114.png 768w\" sizes=\"auto, (max-width: 974px) 100vw, 974px\" \/><\/a><\/p>\n<p>Now your MySQL server is all set up, and you can start using MySQL using the \u201c<strong>sudo mysql<\/strong>&#8221; command. However, it is a better option to <strong>secure your MySQL installation<\/strong>.<\/p>\n<h3 id=\"running-mysql-secure-installation-wizard\">Running MySQL Secure Installation Wizard<\/h3>\n<p>To secure the MySQL server deployment with custom configurations, you can run the \u201csecure installation wizard.\u201d But before that, open up the MySQL shell using the following command:<\/p>\n<pre>sudo mysql<\/pre>\n<p>And once you are inside the shell, run the following command:<\/p>\n<pre>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'SetRootPasswordHere';<\/pre>\n<p><strong>Make sure to change the password field<\/strong> and then exit from the MySQL shell<\/p>\n<pre>exit;<\/pre>\n<p>This will <strong>prevent the MySQL installation from running into any errors<\/strong>. Now, open up the secure installation using the following command:<\/p>\n<pre>sudo mysql_secure_installation<\/pre>\n<p>And then, enter the password for the root user that you have set up in the previous command:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/6-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2406\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/6-3.png\" alt=\"\" width=\"972\" height=\"241\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/6-3.png 972w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/6-3-300x74.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/6-3-768x190.png 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><\/a><\/p>\n<p>It will first ask the \u201c<strong>Validate Password Component<\/strong>,\u201d which checks for strong passwords. You can choose your option, but for this post, we are going with \u201c<strong>yes<\/strong>\u201d:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/7-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2407\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/7-3.png\" alt=\"\" width=\"980\" height=\"321\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/7-3.png 980w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/7-3-300x98.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/7-3-768x252.png 768w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><\/a><\/p>\n<p>After that, <strong>choose the level for the Password validation policy<\/strong> according to your choice:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/8-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2408\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/8-3.png\" alt=\"\" width=\"983\" height=\"224\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/8-3.png 983w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/8-3-300x68.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/8-3-768x175.png 768w\" sizes=\"auto, (max-width: 983px) 100vw, 983px\" \/><\/a><\/p>\n<p>After that, the setup will ask for the <strong>root password for MySQL<\/strong> according to the password policy you just chose. Therefore, provide a password and reconfirm it, and type \u201c<strong>Y<\/strong>\u201d to confirm it:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/9-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2409\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/9-2.png\" alt=\"\" width=\"977\" height=\"235\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/9-2.png 977w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/9-2-300x72.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/9-2-768x185.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/a><\/p>\n<p>After that, it will ask you about <strong>removing the anonymous users<\/strong>:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/10-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2410\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/10-2.png\" alt=\"\" width=\"978\" height=\"210\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/10-2.png 978w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/10-2-300x64.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/10-2-768x165.png 768w\" sizes=\"auto, (max-width: 978px) 100vw, 978px\" \/><\/a><\/p>\n<p>And then, it will ask about <strong>disallowing remote login<\/strong>:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/11-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2411\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/11-2.png\" alt=\"\" width=\"973\" height=\"164\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/11-2.png 973w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/11-2-300x51.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/11-2-768x129.png 768w\" sizes=\"auto, (max-width: 973px) 100vw, 973px\" \/><\/a><\/p>\n<p>After that, it will ask you if you want to <strong>remove the default test database<\/strong>:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/12-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2412\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/12-2.png\" alt=\"\" width=\"974\" height=\"219\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/12-2.png 974w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/12-2-300x67.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/12-2-768x173.png 768w\" sizes=\"auto, (max-width: 974px) 100vw, 974px\" \/><\/a><\/p>\n<p>Once that is done, it will ask you if you want to <strong>reload the table privileges<\/strong>:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2413\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-2.png\" alt=\"\" width=\"975\" height=\"108\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-2.png 975w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-2-300x33.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-2-768x85.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/a><\/p>\n<p>Once that is done, it will show you a <strong>success message<\/strong> that everything has been completed successfully:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/14-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2414\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/14-1.png\" alt=\"\" width=\"979\" height=\"142\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/14-1.png 979w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/14-1-300x44.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/14-1-768x111.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/a><\/p>\n<p>Like what you see so far? <a href=\"https:\/\/draculaservers.com\/tutorials\/\" target=\"_blank\" rel=\"noopener\">Check out our other blogs for Linux!<\/a><\/p>\n<h3 id=\"using-mysql-after-installation\">Using MySQL After Installation<\/h3>\n<p>After the secure installation, you can <strong>access the MySQL shell with the root user<\/strong> using the following commands:<\/p>\n<pre>sudo mysql -u root -p<\/pre>\n<p>It will ask you about the root password. Provide that and hit the enter key again:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/15.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2415\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/15.png\" alt=\"\" width=\"970\" height=\"205\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/15.png 970w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/15-300x63.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/15-768x162.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/a><\/p>\n<p>Doing that will take you inside the MySQL shell, where you can run the following command to test that everything is working fine:<\/p>\n<pre>show Databases;<\/pre>\n<p>Which will return the following output:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2416\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/16.png\" alt=\"\" width=\"977\" height=\"333\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/16.png 977w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/16-300x102.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/16-768x262.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/a><\/p>\n<p><strong>Congratulations!<\/strong> Now you can freely use your secure MySQL on Linux.<\/p>\n<hr \/>\n<h2 id=\"how-to-remove-uninstall-mysql-in-linux\">How to Remove\/Uninstall MySQL in Linux?<\/h2>\n<p>If you are not using MySQL and it is sitting idle on your Linux machine, it is better to remove it to save memory and space. To remove the MySQL Server from your Linux Distribution, you can follow the steps below:<\/p>\n<h3 id=\"step-1-stop-mysql-service\">Step 1: Stop MySQL Service<\/h3>\n<p>Start by stopping the MySQL service using the following command:<\/p>\n<pre>sudo systemctl stop mysql<\/pre>\n<p>This will <strong>ensure that no error occurs<\/strong> during the uninstallation process of MySQL.<\/p>\n<h3 id=\"step-2-remove-mysql-installation\">Step 2: Remove MySQL Installation<\/h3>\n<p><strong>To remove MySQL in Ubuntu<\/strong>, run the following command:<\/p>\n<pre>sudo apt remove mysql-server mysql-client\r\n\r\nsudo apt autoremove\r\n\r\nsudo apt autoclean<\/pre>\n<p><strong>For CentOS or RHEL<\/strong>, run the following command:<\/p>\n<pre>sudo yum remove mysql-client mysql-server<\/pre>\n<p><strong>For Fedora<\/strong>, run the following command:<\/p>\n<pre>sudo dnf remove mysql-client mysql-server<\/pre>\n<h3 id=\"step-3-remove-mysql-configuration-files\">Step 3: Remove MySQL Configuration Files<\/h3>\n<p>Last, you want to <strong>delete the configuration files of MySQL<\/strong> using the following commands:<\/p>\n<pre>sudo rm -rf \/etc\/mysql\r\n\r\nsudo rm -rf \/var\/lib\/mysql<\/pre>\n<h3 id=\"step-4-verify-the-uninstallation\">Step 4: Verify the Uninstallation<\/h3>\n<p>Once you have removed the installation of MySQL or MySQL Server, you can verify it by running the following command:<\/p>\n<pre>mysql --version<\/pre>\n<p>This will return an error that the <strong>command \u201cmysql\u201d was not found<\/strong>. That also sums up this post.<\/p>\n<h2 id=\"dracula-vps-hosting-service\">Dracula VPS Hosting Service<\/h2>\n<p><a href=\"http:\/\/draculaservers.com\"><span style=\"font-weight: 400;\">Dracula Servers<\/span><\/a><span style=\"font-weight: 400;\"> offers high-performance server hosting at entry-level prices. The plans include Linux VPS, Sneaker Servers, Dedicated Servers &amp; turnkey solutions. If you&#8217;re looking for quality self-managed servers with high amounts of RAM and storage, look no further.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Check the plans for yourself by clicking <\/span><a href=\"https:\/\/draculaservers.com\/#pick-plan\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Here<\/span><\/a><span style=\"font-weight: 400;\">!<\/span><\/p>\n<h2 id=\"wrap-up\">Wrap up<\/h2>\n<p>MySQL is one amazing RDBMS that is available on the market. To <strong>install MySQL<\/strong> on your <strong>Linux distribution<\/strong>, follow the steps mentioned in this guide. After the installation, you can access the MySQL shell using the \u201c<strong>sudo mysql<\/strong>\u201d command or go for a secure MySQL Deployment through the <strong>MySQL Secure Installation<\/strong>.<\/p>\n<p>Once MySQL is not required, you can remove it from your Linux distribution to save space and memory using the commands mentioned in this guide.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL is one of the most famous relational database management systems in the current market. The capabilities of this RDBMS are not only amazing but also quite user-friendly. Many people prefer MySQL over other alternatives available in the market. Often, installing MySQL and removing it from a Linux-based operating system can be quite daunting for [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":2419,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72,67,1,2],"tags":[114,102,48,117,116,115],"class_list":["post-2400","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-debian","category-getting-started","category-linux-basics","tag-install-mysql","tag-linux","tag-mysql","tag-mysql-ubuntu","tag-remove-mysql","tag-uninstall-mysql"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"featured_image_urls_v2":{"full":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula.png",1280,720,false],"thumbnail":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula-150x150.png",150,150,true],"medium":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula-300x169.png",300,169,true],"medium_large":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula-768x432.png",768,432,true],"large":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula-1024x576.png",1024,576,true],"1536x1536":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula.png",1280,720,false],"2048x2048":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula.png",1280,720,false],"pk-small":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula-80x80.png",80,80,true],"pk-thumbnail":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula-300x225.png",300,225,true]},"post_excerpt_stackable_v2":"<p>MySQL is one of the most famous relational database management systems in the current market. The capabilities of this RDBMS are not only amazing but also quite user-friendly. Many people prefer MySQL over other alternatives available in the market. Often, installing MySQL and removing it from a Linux-based operating system can be quite daunting for new beginners. If that is the case, then this post will be your friend and guide you through the process. Let\u2019s Begin. Prerequisite MySQL is often installed as a requirement with other applications and services that the user installs on a Linux operating system. You&hellip;<\/p>\n","category_list_v2":"<a href=\"https:\/\/draculaservers.com\/tutorials\/category\/centos\/\" rel=\"category tag\">CentOS<\/a>, <a href=\"https:\/\/draculaservers.com\/tutorials\/category\/debian\/\" rel=\"category tag\">Debian<\/a>, <a href=\"https:\/\/draculaservers.com\/tutorials\/category\/getting-started\/\" rel=\"category tag\">Getting Started<\/a>, <a href=\"https:\/\/draculaservers.com\/tutorials\/category\/linux-basics\/\" rel=\"category tag\">Linux Basics<\/a>","author_info_v2":{"name":"Abdul Mannan","url":"https:\/\/draculaservers.com\/tutorials\/author\/abdul-mannan-tbgmail-com\/"},"comments_num_v2":"0 comments","yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How do I Install &amp; Uninstall MySQL in Linux? - Dracula Servers Tutorials<\/title>\n<meta name=\"description\" content=\"MySQL can be installed easily in the Linux Operating System by following our detailed step by step guide for installing and removing MySQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How do I Install &amp; Uninstall MySQL in Linux? - Dracula Servers Tutorials\" \/>\n<meta property=\"og:description\" content=\"MySQL can be installed easily in the Linux Operating System by following our detailed step by step guide for installing and removing MySQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Dracula Servers Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-13T20:53:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-06T06:59:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Abdul Mannan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abdul Mannan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/\"},\"author\":{\"name\":\"Abdul Mannan\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ac89d0281f4fb596bfaa0bc1e746c8a6\"},\"headline\":\"How do I Install &#038; Uninstall MySQL in Linux?\",\"datePublished\":\"2023-04-13T20:53:16+00:00\",\"dateModified\":\"2023-06-06T06:59:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/\"},\"wordCount\":1052,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/sql-dracula.png\",\"keywords\":[\"Install MySQL\",\"linux\",\"MySQL\",\"MySQL Ubuntu\",\"Remove MySQL\",\"Uninstall MySQL\"],\"articleSection\":[\"CentOS\",\"Debian\",\"Getting Started\",\"Linux Basics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/\",\"name\":\"How do I Install & Uninstall MySQL in Linux? - Dracula Servers Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/sql-dracula.png\",\"datePublished\":\"2023-04-13T20:53:16+00:00\",\"dateModified\":\"2023-06-06T06:59:06+00:00\",\"description\":\"MySQL can be installed easily in the Linux Operating System by following our detailed step by step guide for installing and removing MySQL.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/sql-dracula.png\",\"contentUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/sql-dracula.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/install-uninstall-mysql-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How do I Install &#038; Uninstall MySQL in Linux?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\",\"name\":\"Dracula Servers Tutorials\",\"description\":\"Dedicated Servers\",\"publisher\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\",\"name\":\"Dracula Servers\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/dracula_full_logo_smaller.png\",\"contentUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/dracula_full_logo_smaller.png\",\"width\":1625,\"height\":200,\"caption\":\"Dracula Servers\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ac89d0281f4fb596bfaa0bc1e746c8a6\",\"name\":\"Abdul Mannan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g\",\"caption\":\"Abdul Mannan\"},\"description\":\"An individual trying to decipher the enigmas of technology by the sheer driving force of curiosity. Interested in learning new skills and being better at those skills than the lot.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How do I Install & Uninstall MySQL in Linux? - Dracula Servers Tutorials","description":"MySQL can be installed easily in the Linux Operating System by following our detailed step by step guide for installing and removing MySQL.","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:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/","og_locale":"en_US","og_type":"article","og_title":"How do I Install & Uninstall MySQL in Linux? - Dracula Servers Tutorials","og_description":"MySQL can be installed easily in the Linux Operating System by following our detailed step by step guide for installing and removing MySQL.","og_url":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/","og_site_name":"Dracula Servers Tutorials","article_published_time":"2023-04-13T20:53:16+00:00","article_modified_time":"2023-06-06T06:59:06+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula.png","type":"image\/png"}],"author":"Abdul Mannan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Abdul Mannan","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/#article","isPartOf":{"@id":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/"},"author":{"name":"Abdul Mannan","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/person\/ac89d0281f4fb596bfaa0bc1e746c8a6"},"headline":"How do I Install &#038; Uninstall MySQL in Linux?","datePublished":"2023-04-13T20:53:16+00:00","dateModified":"2023-06-06T06:59:06+00:00","mainEntityOfPage":{"@id":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/"},"wordCount":1052,"commentCount":0,"publisher":{"@id":"https:\/\/draculaservers.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula.png","keywords":["Install MySQL","linux","MySQL","MySQL Ubuntu","Remove MySQL","Uninstall MySQL"],"articleSection":["CentOS","Debian","Getting Started","Linux Basics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/","url":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/","name":"How do I Install & Uninstall MySQL in Linux? - Dracula Servers Tutorials","isPartOf":{"@id":"https:\/\/draculaservers.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/#primaryimage"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula.png","datePublished":"2023-04-13T20:53:16+00:00","dateModified":"2023-06-06T06:59:06+00:00","description":"MySQL can be installed easily in the Linux Operating System by following our detailed step by step guide for installing and removing MySQL.","breadcrumb":{"@id":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/#primaryimage","url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula.png","contentUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/sql-dracula.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/draculaservers.com\/tutorials\/install-uninstall-mysql-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/draculaservers.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"How do I Install &#038; Uninstall MySQL in Linux?"}]},{"@type":"WebSite","@id":"https:\/\/draculaservers.com\/tutorials\/#website","url":"https:\/\/draculaservers.com\/tutorials\/","name":"Dracula Servers Tutorials","description":"Dedicated Servers","publisher":{"@id":"https:\/\/draculaservers.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/draculaservers.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/draculaservers.com\/tutorials\/#organization","name":"Dracula Servers","url":"https:\/\/draculaservers.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2016\/06\/dracula_full_logo_smaller.png","contentUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2016\/06\/dracula_full_logo_smaller.png","width":1625,"height":200,"caption":"Dracula Servers"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/person\/ac89d0281f4fb596bfaa0bc1e746c8a6","name":"Abdul Mannan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g","caption":"Abdul Mannan"},"description":"An individual trying to decipher the enigmas of technology by the sheer driving force of curiosity. Interested in learning new skills and being better at those skills than the lot."}]}},"_links":{"self":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/2400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/comments?post=2400"}],"version-history":[{"count":6,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/2400\/revisions"}],"predecessor-version":[{"id":2533,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/2400\/revisions\/2533"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/media\/2419"}],"wp:attachment":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/media?parent=2400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/categories?post=2400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/tags?post=2400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}