{"id":10055,"date":"2020-08-12T09:39:24","date_gmt":"2020-08-12T09:39:24","guid":{"rendered":"https:\/\/www.milesweb.in\/hosting-faqs\/?p=10055"},"modified":"2020-08-12T09:39:24","modified_gmt":"2020-08-12T09:39:24","slug":"empty-a-mysql-database","status":"publish","type":"post","link":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/","title":{"rendered":"Learn to Empty a MySQL Database in Simple Steps"},"content":{"rendered":"<p>Using phpMyAdmin or SSH, you can empty the content of a MySQL database. But ensure that you take a backup of your database (phpMyAdmin or SSH) before making any changes to your databases.<\/p>\n<h3>Empty a MySQL Database Using phpMyAdmin<\/h3>\n<p>This is the easiest way to empty a MySQL database as compared to other ways.<\/p>\n<p>Login to your cPanel account and go to <strong>Databses -&gt; phpMyAdmin<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10056\" src=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png\" alt=\"\" width=\"960\" height=\"188\" srcset=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png 960w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min-300x59.png 300w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min-768x150.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>Then select the database you want to empty.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-10058\" src=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/select-database-new-min-1024x466.png\" alt=\"\" width=\"1024\" height=\"466\" srcset=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/select-database-new-min-1024x466.png 1024w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/select-database-new-min-300x137.png 300w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/select-database-new-min-768x350.png 768w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/select-database-new-min.png 1347w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>You will see a list with all the database\u2019s tables. For selecting all the tables in the database click on <strong>Check All<\/strong> link.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-10059\" src=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/with-selected-min-1024x599.png\" alt=\"\" width=\"1024\" height=\"599\" srcset=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/with-selected-min-1024x599.png 1024w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/with-selected-min-300x175.png 300w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/with-selected-min-768x449.png 768w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/with-selected-min.png 1079w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Next, select <strong>Drop<\/strong> from the drop down menu of <strong>\u201cWith selected:\u201d<\/strong>. With this. the <strong>DROP TABLE SQL<\/strong> query will run on all tables and after you confirm that you wish to proceed by clicking on <strong>Go<\/strong>, the database will be emptied.<\/p>\n<h3>Empty a MySQL Database Using SSH<\/h3>\n<p>When you drop the content of a database using SSH, it proves to be very useful in terms large databases. For this, you need 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>Go to MySQL with your database MySQL user by executing the below command over SSH:<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \">mysql -uUSERNAME -p<\/pre>\n<p>Remember to replace <strong>USERNAME<\/strong> with your MySQL user and your password when prompted.<\/p>\n<ul>\n<li>Then run the below <strong>DROP<\/strong> and <strong>CREATE<\/strong> commands:<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \">mysql&gt; DROP database DATABASE_NAME;<\/pre>\n<pre class=\"lang:default decode:true \">mysql&gt; CREATE database DATABASE_NAME;<\/pre>\n<p>In this the, <strong>DATABASE_NAME<\/strong> is the name of your database.<\/p>\n<p>In this way you can empty a MySQL database using phpMyAdmin and SSH in simple steps.<\/p>\n<div class=\"kb-wisdom-wrapr kb-wisdom-bulb kb-wisdom-wrapr-blue\">\n<div class=\"kb-wisdom-col kb-wisdom-col-icon\">\n<div class=\"kb-wisdom-icon\">\n<div><\/div>\n<\/div><\/div>\n<div class=\"kb-wisdom-col kb-wisdom-col-content\">\n<p><h3>Also Read<\/h3>\n<p><a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/enable-ssh-access-for-a-new-and-existing-cpanel-account\/\" target=\"_blank\" rel=\"noopener\"><strong>How to Enable SSH Access for a New and Existing cPanel Account?<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-connect-your-server-by-ssh\/\" target=\"_blank\" rel=\"noopener\"><strong>How To Login to Your Server By SSH?<\/strong><\/a><\/p>\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Using phpMyAdmin or SSH, you can empty the content of a MySQL database. But ensure that you take a backup of your database (phpMyAdmin or SSH) before making any changes to your databases. Empty a MySQL Database Using phpMyAdmin This is the easiest way to empty a MySQL database as compared to other ways. Login [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[967],"tags":[1562,205,469,629,121],"class_list":["post-10055","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-mysql","tag-empty-mysql-database","tag-mysql","tag-mysql-database","tag-phpmyadmin","tag-ssh"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn to Empty a MySQL Database in Simple Steps<\/title>\n<meta name=\"description\" content=\"The article reveals the stpes to empty a MySQL database using phpMyAdmin and SSH.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/\" \/>\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\" \/>\n<meta property=\"og:description\" content=\"The article reveals the stpes to empty a MySQL database using phpMyAdmin and SSH.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-12T09:39:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png\" \/>\n<meta name=\"author\" content=\"Pallavi Godse\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pallavi Godse\" \/>\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\":\"Article\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/\"},\"author\":{\"name\":\"Pallavi Godse\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\"},\"headline\":\"Learn to Empty a MySQL Database in Simple Steps\",\"datePublished\":\"2020-08-12T09:39:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/\"},\"wordCount\":286,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png\",\"keywords\":[\"empty mysql database\",\"MySQL\",\"MySQL database\",\"phpmyadmin\",\"SSH\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/\",\"name\":\"Learn to Empty a MySQL Database in Simple Steps\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png\",\"datePublished\":\"2020-08-12T09:39:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\"},\"description\":\"The article reveals the stpes to empty a MySQL database using phpMyAdmin and SSH.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png\",\"contentUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png\",\"width\":960,\"height\":188},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn to Empty a MySQL Database in Simple Steps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\",\"name\":\"Pallavi Godse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g\",\"caption\":\"Pallavi Godse\"},\"description\":\"Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.\",\"sameAs\":[\"https:\/\/www.milesweb.in\"],\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/author\/pallavi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn to Empty a MySQL Database in Simple Steps","description":"The article reveals the stpes to empty a MySQL database using phpMyAdmin and SSH.","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:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/","og_locale":"en_US","og_type":"article","og_title":"Learn to Empty a MySQL Database in Simple Steps","og_description":"The article reveals the stpes to empty a MySQL database using phpMyAdmin and SSH.","og_url":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2020-08-12T09:39:24+00:00","og_image":[{"url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png","type":"","width":"","height":""}],"author":"Pallavi Godse","twitter_misc":{"Written by":"Pallavi Godse","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#article","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/"},"author":{"name":"Pallavi Godse","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945"},"headline":"Learn to Empty a MySQL Database in Simple Steps","datePublished":"2020-08-12T09:39:24+00:00","mainEntityOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/"},"wordCount":286,"commentCount":0,"image":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png","keywords":["empty mysql database","MySQL","MySQL database","phpmyadmin","SSH"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/","name":"Learn to Empty a MySQL Database in Simple Steps","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png","datePublished":"2020-08-12T09:39:24+00:00","author":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945"},"description":"The article reveals the stpes to empty a MySQL database using phpMyAdmin and SSH.","breadcrumb":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#primaryimage","url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png","contentUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-min.png","width":960,"height":188},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/empty-a-mysql-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.in\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Learn to Empty a MySQL Database in Simple Steps"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.in\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945","name":"Pallavi Godse","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g","caption":"Pallavi Godse"},"description":"Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.","sameAs":["https:\/\/www.milesweb.in"],"url":"https:\/\/www.milesweb.in\/hosting-faqs\/author\/pallavi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/10055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=10055"}],"version-history":[{"count":3,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/10055\/revisions"}],"predecessor-version":[{"id":10062,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/10055\/revisions\/10062"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=10055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=10055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=10055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}