{"id":2256,"date":"2016-07-19T14:50:17","date_gmt":"2016-07-19T18:50:17","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=2256"},"modified":"2018-01-12T14:06:58","modified_gmt":"2018-01-12T19:06:58","slug":"repairing-tables-indexes-mysql-database","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/","title":{"rendered":"Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database"},"content":{"rendered":"<h1>Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database<\/h1>\n<p>MySQL is a RDBMS (relationial database(DB) management system) that is available as an open-source software for all platforms. As a database tool, MySQL is well set up to handle tables. These tables allow users to store information in a clean, organized format. The type of data in question differs between columns. For larger tables, MySQL also has an index system, which allows simpler look-up of columns. The following guide will tell you how to rebuild or repair tables or indexes.<\/p>\n<h2>Getting Started<\/h2>\n<p>To complete this guide, you will need the following:<br \/>\n\u2022 1 Node (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">Cloud Server<\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\">Dedicated Server<\/a>) with a MySQL database<\/p>\n<h2>Tutorial<\/h2>\n<p>For rebuilding or repairing, you will need to follow these steps.<\/p>\n<p>In order to rebuild a MySQL table, you must first dump and reload it. This can be done using &#8220;mysqldump&#8221; to create a dump file. Once the dump file is created, you can then use and &#8220;mysql&#8221; to reload the database:<\/p>\n<p><code>mysqldump db_name table_name > dump.sql<br \/>\nmysql db_name < dump.sql<\/code><\/p>\n<p>If you would like to rebuild all tables into a single DB, this can be done by specifying the database name only, without any table specified. In this case, you can use \"mysqldump\" to create a dump file, similar to the previous step, and then use \"mysql\" to reload the DB :<\/p>\n<p><code>mysqldump db_name > dump.sql<br \/>\nmysql db_name < dump.sql<\/code><\/p>\n<p>If, instead, you would like to rebuild all database tables into all the databases, then you can still use \"mysqldump\", but now with the \"--all-databases\" option. This will put the tables into all databases, instead of into a single database:<\/p>\n<p><code>mysqldump --all-databases > dump.sql<br \/>\nmysql < dump.sql<\/code><\/p>\n<p>You can also repair all tables in a specific database. For this, you can use \"mysqlcheck\" :<\/p>\n<p><code>mysqlcheck --repair --databases db_name<\/code><\/p>\n<p>Like the previous section, you can do this in all databases as well. To repair all tables into all databases, use \"mysqlcheck\" in the following way:<\/p>\n<p><code>mysqlcheck --repair --all-databases<\/code><\/p>\n<h2>Conclusion<\/h2>\n<p>If you follow these steps, then the database tables you wanted to rebuild or repair should be working as desired. Depending on your goals, check to see if everything is working as planned, and if not, make sure you followed the corresponding step. If this guide was helpful to you, kindly share it with others who may also be interested. <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database MySQL is a RDBMS (relationial database(DB) management system) that is available as an open-source software for all platforms. As a database tool, MySQL is well set up to handle tables. These tables allow users to store information in a clean, organized format. The type<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[],"class_list":["post-2256","post","type-post","status-publish","format-standard","hentry","category-database"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to rebuild or repair MyISAM Tables or Indexes on your MySQL database. Read now &amp; Start to organize your informations!\" \/>\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.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will show you how to rebuild or repair MyISAM Tables or Indexes on your MySQL database. Read now &amp; Start to organize your informations!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-19T18:50:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-12T19:06:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. 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.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/\",\"name\":\"Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\"},\"datePublished\":\"2016-07-19T18:50:17+00:00\",\"dateModified\":\"2018-01-12T19:06:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will show you how to rebuild or repair MyISAM Tables or Indexes on your MySQL database. Read now & Start to organize your informations!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.globo.tech\/learning-center\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\/\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database - Globo.Tech","description":"This tutorial will show you how to rebuild or repair MyISAM Tables or Indexes on your MySQL database. Read now & Start to organize your informations!","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.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/","og_locale":"en_US","og_type":"article","og_title":"Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database - Globo.Tech","og_description":"This tutorial will show you how to rebuild or repair MyISAM Tables or Indexes on your MySQL database. Read now & Start to organize your informations!","og_url":"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/","og_site_name":"Globo.Tech","article_published_time":"2016-07-19T18:50:17+00:00","article_modified_time":"2018-01-12T19:06:58+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/","url":"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/","name":"Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-07-19T18:50:17+00:00","dateModified":"2018-01-12T19:06:58+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will show you how to rebuild or repair MyISAM Tables or Indexes on your MySQL database. Read now & Start to organize your informations!","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/repairing-tables-indexes-mysql-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"Rebuilding or Repairing MyISAM Tables or Indexes on a MySQL database"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=2256"}],"version-history":[{"count":5,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2256\/revisions"}],"predecessor-version":[{"id":4084,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2256\/revisions\/4084"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=2256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=2256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=2256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}