{"id":8078,"date":"2020-08-12T09:39:19","date_gmt":"2020-08-12T09:39:19","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=8078"},"modified":"2022-02-16T12:46:55","modified_gmt":"2022-02-16T12:46:55","slug":"empty-a-mysql-database","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/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><a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13576\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.png\" alt=\"databases-phpmyadmin\" width=\"960\" height=\"188\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.png 960w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-300x59.png 300w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin-768x150.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/a><\/p>\n<p>Then select the database you want to empty.<\/p>\n<p><a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/select-database-new.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13577\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/select-database-new.png\" alt=\"select-database-new\" width=\"1024\" height=\"466\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/select-database-new.png 1024w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/select-database-new-300x137.png 300w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/select-database-new-768x350.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/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><a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/with-selected.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13578\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/with-selected.png\" alt=\"with-selected\" width=\"1024\" height=\"599\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/with-selected.png 1024w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/with-selected-300x175.png 300w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/with-selected-768x449.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/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>\n<\/div>\n<div class=\"kb-wisdom-col kb-wisdom-col-content\">\n<h3>Also Read<\/h3>\n<p><a href=\"https:\/\/www.milesweb.co.uk\/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.co.uk\/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<\/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":[947],"tags":[1543,205,471,616,121],"class_list":["post-8078","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 v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\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.co.uk\/hosting-faqs\/empty-a-mysql-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\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.co.uk\/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:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-16T12:46:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.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=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/\",\"name\":\"Learn to Empty a MySQL Database in Simple Steps\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.png\",\"datePublished\":\"2020-08-12T09:39:19+00:00\",\"dateModified\":\"2022-02-16T12:46:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/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.co.uk\/hosting-faqs\/empty-a-mysql-database\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.png\",\"contentUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.png\",\"width\":960,\"height\":188,\"caption\":\"databases-phpmyadmin\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn to Empty a MySQL Database in Simple Steps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\",\"name\":\"Pallavi Godse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?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.\",\"url\":\"https:\/\/www.milesweb.co.uk\/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.co.uk\/hosting-faqs\/empty-a-mysql-database\/","og_locale":"en_GB","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.co.uk\/hosting-faqs\/empty-a-mysql-database\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2020-08-12T09:39:19+00:00","article_modified_time":"2022-02-16T12:46:55+00:00","og_image":[{"url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.png","type":"","width":"","height":""}],"author":"Pallavi Godse","twitter_misc":{"Written by":"Pallavi Godse","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/","name":"Learn to Empty a MySQL Database in Simple Steps","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.png","datePublished":"2020-08-12T09:39:19+00:00","dateModified":"2022-02-16T12:46:55+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/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.co.uk\/hosting-faqs\/empty-a-mysql-database\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/#primaryimage","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.png","contentUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2020\/08\/databases-phpmyadmin.png","width":960,"height":188,"caption":"databases-phpmyadmin"},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/empty-a-mysql-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Learn to Empty a MySQL Database in Simple Steps"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945","name":"Pallavi Godse","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eefc9695ea2b2c6e143c9c9919701aaa?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.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/pallavi\/"}]}},"views":469,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=8078"}],"version-history":[{"count":2,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8078\/revisions"}],"predecessor-version":[{"id":13580,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8078\/revisions\/13580"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=8078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=8078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=8078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}