{"id":475,"date":"2016-03-01T14:46:43","date_gmt":"2016-03-01T14:46:43","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=475"},"modified":"2016-03-01T14:46:43","modified_gmt":"2016-03-01T14:46:43","slug":"resolving-broken-or-crashed-tables-in-mariadb-mysql","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2016\/03\/01\/resolving-broken-or-crashed-tables-in-mariadb-mysql\/","title":{"rendered":"Resolving Broken or Crashed Tables in Mariadb (MySQL)"},"content":{"rendered":"<p>So we had someone with a lot of errors like this in mariadb.<\/p>\n<pre>\r\n60225  6:24:49 [Note] Server socket created on IP: '0.0.0.0'.\r\n160225  6:24:49 [Note] Event Scheduler: Loaded 0 events\r\n160225  6:24:49 [Note] \/usr\/libexec\/mysqld: ready for connections.\r\nVersion: '5.5.44-MariaDB'  socket: '\/var\/lib\/mysql\/mysql.sock'  port: 3306  MariaDB Server\r\n160225  6:24:49 [ERROR] mysqld: Table '.\/enovie_lad\/wp_options' is marked as crashed and should be repaired\r\n160225  6:24:49 [Warning] Checking table:   '.\/enovie_lad\/wp_options'\r\n160225  6:28:18 [ERROR] mysqld: Table '.\/enovie_lad\/wp_lad_course_assign' is marked as crashed and should be repaired\r\n160225  6:28:18 [Warning] Checking table:   '.\/enovie_lad\/wp_lad_course_assign'\r\n160225  6:28:18 [ERROR] mysqld: Table '.\/enovie_lad\/wp_lad_course_attendence' is marked as crashed and should be repaired\r\n160225  6:28:18 [Warning] Checking table:   '.\/enovie_lad\/wp_lad_course_attendence'\r\n160225  6:28:18 [ERROR] mysqld: Table '.\/enovie_lad\/wp_lad_userlog' is marked as crashed and should be repaired\r\n160225  6:28:18 [Warning] Checking table:   '.\/enovie_lad\/wp_lad_userlog'\r\n160227 02:31:55 mysqld_safe Number of processes running now: 0\r\n160227 02:31:55 mysqld_safe mysqld restarted\r\n160227  2:31:55 [Note] \/usr\/libexec\/mysqld (mysqld 5.5.44-MariaDB) starting as process 17264 ...\r\n<\/pre>\n<p>You could fix this using phpmyadmin&#8217;s repair function. See, ask google<br \/>\n<a href=\"https:\/\/www.google.co.uk\/search?q=phpmyadmin+repair+database&#038;ie=utf-8&#038;oe=utf-8&#038;gws_rd=cr&#038;ei=v6jVVrXyDIGsU6bjvNgK\"> Ask Google <\/a><\/p>\n<p>Or alternatively you could use mysqlcheck to repair the database(s). <\/p>\n<pre>\r\n.\/client\/mysqlcheck [OPTIONS] database [tables]\r\n<\/pre>\n<pre>\r\n.\/client\/mysqlcheck [OPTIONS] --databases DB1 [DB2 DB3...]\r\n<\/pre>\n<p>OR<\/p>\n<pre>\r\n.\/client\/mysqlcheck [OPTIONS] --all-databases\r\n<\/pre>\n<p>Inside the options you need to define -r, for repair. So if you have a database called db1 and a table called wp_lad_userlog you would run something like<\/p>\n<pre>\r\n.\/client\/mysqlcheck -r database wp_lad_userlog \r\n<\/pre>\n<p>For all databases to be repaired (take care);<\/p>\n<pre> \r\n.\/client\/mysqlcheck -r --all-databases\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>So we had someone with a lot of errors like this in mariadb. 60225 6:24:49 [Note] Server socket created on IP: &#8216;0.0.0.0&#8217;. 160225 6:24:49 [Note] Event Scheduler: Loaded 0 events 160225 6:24:49 [Note] \/usr\/libexec\/mysqld: ready for connections. Version: &#8216;5.5.44-MariaDB&#8217; socket: &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2016\/03\/01\/resolving-broken-or-crashed-tables-in-mariadb-mysql\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,7,2],"tags":[],"class_list":["post-475","post","type-post","status-publish","format-standard","hentry","category-linux","category-management-tools","category-mysql"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=475"}],"version-history":[{"count":1,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/475\/revisions"}],"predecessor-version":[{"id":476,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/475\/revisions\/476"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}