{"id":2999,"date":"2021-10-13T10:39:01","date_gmt":"2021-10-13T10:39:01","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=2999"},"modified":"2021-10-13T12:35:32","modified_gmt":"2021-10-13T12:35:32","slug":"learn-to-empty-a-mysql-database-in-simple-steps","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/","title":{"rendered":"Learn to Empty a MySQL Database in Simple Steps"},"content":{"rendered":"<p>You can empty the content of a MySQL database Using phpMyAdmin or SSH. But you have to make sure that you take a backup of your database (phpMyAdmin or SSH) before making any changes to your databases.<\/p>\n<h2>Empty a MySQL Database Using phpMyAdmin<\/h2>\n<p>As compared to other ways this is the easiest way to empty a MySQL database .<\/p>\n<p>Login to your cPanel account and navigate to <strong>Databses<\/strong> and select <strong>phpMyAdmin<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3000 aligncenter\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-1-300x59.png\" alt=\"delete-mysql-1\" width=\"900\" height=\"176\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-1-300x59.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-1-768x150.png 768w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-1.png 900w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>Then select the database you which you wish to empty.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3001 aligncenter\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-2-300x137.png\" alt=\"delete-mysql-2\" width=\"800\" height=\"364\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-2-300x137.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-2-768x349.png 768w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-2.png 800w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>All the database\u2019s tables list will get appeare. click on <strong>Check All<\/strong> link for selecting all the tables in the database<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3002 aligncenter\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-3-300x175.png\" alt=\"delete-mysql-3\" width=\"800\" height=\"467\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-3-300x175.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-3-768x448.png 768w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-3.png 800w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>Next, from drop down menu of &#8220;With Selected&#8221; select drop. With this, on all tables the DROP TABLE SQL query will run and after you make sure that you wish to move futher by clicking on Go, the database will be emptied.<\/p>\n<p>Empty a MySQL Database Using SSH<\/p>\n<p>Using SSH, when you drop the content of a database, in terms large databases it proves to be very useful. Here you will required to use the drop and create privilege ( or lese you will drop the database but won\u2019t be able to create it again).<\/p>\n<ul>\n<li>Navigate to MySQL with your database MySQL user by executing the command over SSH as mention below:<\/li>\n<\/ul>\n<blockquote><p><strong>mysql -uUSERNAME -p<\/strong><\/p><\/blockquote>\n<p>Keep in mind to replace USERNAME with your MySQL user and your password when prompted.<\/p>\n<ul>\n<li>Then run the DROP and CREATE commands as mention below:<\/li>\n<\/ul>\n<blockquote><p><strong>mysql&gt; DROP database DATABASE_NAME;<\/strong><\/p>\n<p><strong>mysql&gt; CREATE database DATABASE_NAME;<\/strong><\/p><\/blockquote>\n<p>In this the, the name of your database will be DATABASE_NAME.<\/p>\n<p>In this way Using phpMyAdmin and SSH you can empty a MySQL database in simple steps.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can empty the content of a MySQL database Using phpMyAdmin or SSH. But you have to make sure that you take a backup of your database (phpMyAdmin or SSH) before making any changes to your databases. Empty a MySQL Database Using phpMyAdmin As compared to other ways this is the easiest way to empty [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-2999","post","type-post","status-publish","format-standard","hentry","category-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learn to Empty a MySQL Database in Simple Steps - OWS KB<\/title>\n<meta name=\"description\" content=\"You can empty the content of a MySQL database Using phpMyAdmin or SSH. But you have to make sure that you take a backup of your database\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn to Empty a MySQL Database in Simple Steps - OWS KB\" \/>\n<meta property=\"og:description\" content=\"You can empty the content of a MySQL database Using phpMyAdmin or SSH. But you have to make sure that you take a backup of your database\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-13T10:39:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-13T12:35:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-1-300x59.png\" \/>\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=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/delete-mysql-1.png\",\"width\":900,\"height\":176,\"caption\":\"delete-mysql-1\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/\",\"name\":\"Learn to Empty a MySQL Database in Simple Steps - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/#primaryimage\"},\"datePublished\":\"2021-10-13T10:39:01+00:00\",\"dateModified\":\"2021-10-13T12:35:32+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"description\":\"You can empty the content of a MySQL database Using phpMyAdmin or SSH. But you have to make sure that you take a backup of your database\",\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/learn-to-empty-a-mysql-database-in-simple-steps\/\",\"name\":\"Learn to Empty a MySQL Database in Simple Steps\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=2999"}],"version-history":[{"count":1,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2999\/revisions"}],"predecessor-version":[{"id":3003,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2999\/revisions\/3003"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=2999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=2999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=2999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}