title: ERROR 2006 (HY000): MySQL server has gone away - Broken db, table or is mysql broken?
body: <p>On mysql 5.5.53 (innodb databases) under Debian 8</p>
  
  <p>Another mysql newbie learning mysql the hard way. The really hard way. Any help provided would be fantastic. My site is offline which is a really big deal for me. The problem: I can't tell if I have a broken db, table or if mysql itself is broke.n mysql crashes with one db but not with another. I login into mysql using</p>
  
  <pre><code>mysql -u root -p
  </code></pre>
  
  <p>Once in, I type</p>
  
  <pre><code>use drupal;
  show tables;
  </code></pre>
  
  <p>Works great. I then type </p>
  
  <pre><code>use civicrm;
  show tables;
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>ERROR 2006 (HY000): MySQL server has gone away
  No connection. Trying to reconnect...
  </code></pre>
  
  <p>I then try</p>
  
  <pre><code> mysqlcheck -u root --password civicrm
  </code></pre>
  
  <p>Which will begin to list all the tables of civicrm but it hits tables called log_civicrm_* after about 4 tables it crashes with </p>
  
  <pre><code> Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... '
  </code></pre>
  
  <p>Index files ib_logfile1 and ib_logfile0 are both rebuilt. I've set my.cnf to </p>
  
  <pre><code>key_buffer      = 512M
  max_allowed_packet  = 64M
  thread_stack        = 3M
  thread_cache_size       = 8
  </code></pre>
  
  <p>I've tried to dump the database civicrm but it fails just as it starts. I can dump most all the tables except for a select few called log_civicrm_* I've tried to use  </p>
  
  <pre><code>innodb_force_recovery=5
  </code></pre>
  
  <p>No change. The file /var/log/mysql/error.log reveals</p>
  
  <pre><code>170127 21:48:27 [Note] /usr/sbin/mysqld: ready for connections.
  Version: '5.5.53-0+deb8u1'  socket: '/var/run/mysqld/mysqld.sock'  
  port: 3306  (Debian)
  02:48:28 UTC - mysqld got signal 11 ;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Trying to get some variables.
  Some pointers may be invalid and cause the dump to abort.
  Query (7f23402d6f40): is an invalid pointer
  Connection ID (thread ID): 9
  Status: NOT_KILLED
  </code></pre>
  
  <p>Any attempts to drop a table from civicrm all fail with the 2006 error. What are my options here? Does the database need fixing, a table, or is some other thing broken and where do I go next to fix it? Thanks.</p>